Per-ractor (or process) semaphore #392
Replies: 1 comment
-
If you're trying to enforce a concurrency limit in a non-homogeneous environment (e.g. multiple threads, Ractors, or processes), it's impossible to do so using an in-memory In environments like Falcon, where your app might run across multiple schedulers or even processes, any meaningful concurrency limit must be enforced using an external coordination mechanism—something that all units of concurrency can observe and respect. Examples include:
In short: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
How do I ensure a limit of tasks on a per-process basis? Storing a Semaphore in a class variable or constant and then using MY_SEMAPHORE.async results in fibers being used across threads. e.g., for the url-fetch-in-parallel example, how do we ensure only 10 tasks are created in the current Ractor?
Beta Was this translation helpful? Give feedback.
All reactions