-
Notifications
You must be signed in to change notification settings - Fork 2
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
Thread safety. #1
Comments
This promise implementation is not intended for threading - the idea is to use it in a single-threaded cooperative multitasking environment, similar to what javascript is. For inter-thread synchronization and communication, the standard C++ library already has facilities like std::promise and std::future. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The implementation has no mutexes. When calling resolve or reject, you must ensure that either then|fail will be called before or after.
Or was a different usage strategy intended?
I have synchronization failure by assertion
cpp-promise/promise.hpp
Line 600 in c85dd10
The text was updated successfully, but these errors were encountered: