-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Consider edm::async() #29188
Comments
A new Issue was created by @makortel Matti Kortelainen. @Dr15Jones, @smuzaffar, @silviodonato, @makortel, @davidlange6, @fabiocos can you please review it and eventually sign/assign? Thanks. cms-bot commands are listed here |
assign core |
New categories assigned: core @Dr15Jones,@smuzaffar,@makortel you have been requested to review this Pull request/Issue and eventually sign? Thanks |
Would that need a Service to own the thread pool ? |
I haven't managed to come up with a better solution than a Service or a singleton object for a "nice" API, and that is the part I don't like that much. |
Implemented in #44901 |
cms-bot internal usage |
+core |
This issue is fully signed and ready to be closed. |
PR #29141 uses mostly-sleeping threads to achieve "pseudo asynchronous" behavior with RPC API's that do not provide fully asynchronous API (thread does the remote calls, then blocks the thread to wait for response, and after waking up notifies the
edm::WaitingTaskWithArenaHolder
that the work is done). If the use such threads starts to spread (more classes, more modules), it could be beneficial to abstract that behavior.In a sense
std::async()
does the job, exceptfuture
with which one can either query the state, or block the calling threadOne option would be to create
edm::async()
that uses a specific thread pool to minimize thread creation and joining, and continuation passing (e.g. requiringedm::WaitingTaskWithArenaHolder
be passed around).The text was updated successfully, but these errors were encountered: