Replies: 2 comments 2 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
Very cool! Would we be able to use We also have a similar utility to bundle a proxying queue and worker thread together here. That seems to be a common use case, so perhaps we could add public utilities that help with that, although I see that your wrapper always proxies to the main thread instead. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is an alternative C++ wrapper that I created that allows values to be returned. It uses the same trick as the existing wrapper but instead of erasing a
std::function
, it erases astd::packaged_task
. Perhaps this approach could be integrated into the existing C++ wrapper?Note that
std::invoke_result
is only available in C++17 onwards...I then use it like this:
Beta Was this translation helpful? Give feedback.
All reactions