Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ async and forasync delegate to C API #19

Closed
wants to merge 6 commits into from
Closed

Conversation

DaoWen
Copy link
Contributor

@DaoWen DaoWen commented Jun 22, 2016

My understanding was that we wanted the C++ API to be a thin wrapper over the C API. These changes update the C++ API for async, forasync, etc. so that most of the internal logic is delegated to the C code.

This patch should also close issue #17, since it eliminates most of the extra copies of user functors that were happening in the C++ code in the async implementation, and more especially in forasync implementation.


Note: This pull request builds on #16. You can compare the branches corresponding to the pull requests to see the diff between just #16 and this PR: cxx-cleanup-4...cxx-cleanup-5

DaoWen added 6 commits August 13, 2016 21:43
0.1 seconds is still an eternity in CPU cycles,
but much less noticeable by the user than 1 second.
We want to use the C11 _Static_assert if possible (since it gives much
better diagnostics), but there's a fall-back version defined as well,
just in cast the C11 version isn't available.

Since we already assume C++11, it seems safe to assume C11 as well.
This should eliminate some duplicate logic and simplify the C++ API.
This should also eliminate some functor copies that were being caused by
by-value parameter passing of user functors (see issue #17).
This should eliminate some duplicate logic and simplify the C++ API.
This should also eliminate a significant number of functor copies that
were caused by by-value parameter passing and captures of user functors
(see issue #17).
@DaoWen
Copy link
Contributor Author

DaoWen commented Aug 14, 2016

Now that #16 is merged, I've rebased this PR off master.

@DaoWen
Copy link
Contributor Author

DaoWen commented Aug 19, 2016

Superseded by #21.

@DaoWen DaoWen closed this Aug 19, 2016
@DaoWen DaoWen deleted the cxx-cleanup-5 branch August 19, 2016 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants