fresh-mechanic-68429
02/08/2025, 4:26 AM<http://bounded.rs|bounded.rs>
and the process struct to pass through to python.
I'm looking for some guidance on how to proceed with this and what you think the best path would be. The major questions I see are:
- How should the api surface change on Process
? Is this a new field? concurrency_required
?
- How should this interact with process presumption and concurrency_available
? Are they mutually exclusive or can they both be specified?
If you're curious, my very basic implementation just swaps the self.sema.acquire()
for self.sema.acquire_many(count)
(in addition to other argument plumbing) which allows the task to fully block until the desired concurrency is availablehappy-kitchen-89482
02/08/2025, 5:27 AMconcurrency_available
? concurrency_available
is a hint to the engine to say “this process could benefit from this much concurrency”, if available. Your concurrency_required
would (in addition) set a minimum. But concurrency_available
could still be used as a hint that going above the minimum would be beneficial.happy-kitchen-89482
02/08/2025, 5:37 AMconcurrency_available
field to an Enum of concurrency strategies: https://pantsbuild.slack.com/archives/C046T6T9U/p1651773580703069?thread_ts=1651770597.838669&cid=C046T6T9Ufresh-mechanic-68429
02/08/2025, 6:42 AMint | Range(min: int | None, max: int | None) | Exclusive
I don't think the Range should require the max value, so inputs like Range(min=2)
can set min requirement without requesting any additionally concurrency.
Is Exclusive
is just a shorthand type for Range(min=max slots)? Where the implementation would need to acquire all slots
I don't know enough about the py/rust bindings to know if a type like that is easy to implement, or if going with the additional property would be significantly easierhappy-kitchen-89482
02/08/2025, 3:57 PMfresh-mechanic-68429
02/08/2025, 4:39 PMhappy-kitchen-89482
02/08/2025, 10:26 PMhappy-kitchen-89482
02/08/2025, 10:27 PMhappy-kitchen-89482
02/08/2025, 10:28 PMfresh-mechanic-68429
02/08/2025, 10:33 PMfresh-mechanic-68429
02/16/2025, 3:42 AMhappy-kitchen-89482
02/16/2025, 4:02 AM