Replies: 2 comments 23 replies
-
The condition variable from |
Beta Was this translation helpful? Give feedback.
-
Following our discussion last week, this is perhaps further evidence that a condition variable may be unsuited to the task in hand here. Condition variables are designed for control flow, rather than to provide state neither in terms of a cumulative number of events, nor identify which in your case above. Instead it's perhaps time for you to fully embrace 'later'! The good things is it's already a dependency of crew. I think things would work out nicely if you make each mirai a promise and run your logic from the promise action. As these are tied to the mirai, the above problem no longer exists. You'd simply replace |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
crew
implements a special queue to efficiently manage large collections of tasks. Even then, I still need to frequently loop over all the pendingmirai
objects in the compute profile and call.unresolved()
on each one. (Solving wlandau/crew#221 should help, but overhead will still be noticeable at around 100k-1M tasks.) Is there a constant-time way to look up a resolved task, knowing just the compute profile?Beta Was this translation helpful? Give feedback.
All reactions