You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes we need some variables to be execution agent local. Taking a use-case of parallel random number generation. If I want random number generator to be non-blocking for multiple threads, then each thread should have a separate copy of random generator.
For example, in case of a thread pool scheduler a thread_local random generator can be used. But that's not a generic solution.
I don't know how to handle the same with P2300. Is there some way to handle this kind of use-case?
I feel the use-case can be solved if I have 2 queries:
Maximum number of tasks that can be executed concurrently at any moment of time. (can be unbounded too)
Let's say the above query returns n. Then a query like current_execution_id that returns [0, n) representing on which execution agent task is currently at.
The text was updated successfully, but these errors were encountered:
You can always invent your needed queries and add support for them in the receivers env of your schedule operation, at least if you own the execution context yourself.
But querying the receivers env is basically the way to access information that is only known at that time.
Sometimes we need some variables to be execution agent local. Taking a use-case of parallel random number generation. If I want random number generator to be non-blocking for multiple threads, then each thread should have a separate copy of random generator.
For example, in case of a thread pool scheduler a thread_local random generator can be used. But that's not a generic solution.
I don't know how to handle the same with P2300. Is there some way to handle this kind of use-case?
I feel the use-case can be solved if I have 2 queries:
The text was updated successfully, but these errors were encountered: