Deprecate ActorNursery.run_in_actor()
and offer as part of a wrapper cluster API
#290
Labels
api
cancellation
SC teardown semantics and anti-zombie semantics
help wanted
Extra attention is needed
process_spawning
supervision
testing
I've rambled on wayyy too long in #287 but thanks to attempts to resolve that issue I think this is the way I'd like to go on a so called one shot task per actor-style "worker pool" API.
TDLR premises
Portal.result()
+ActorNursery.run_in_actor()
couples a future-like API into our nursery's actor spawning interface at the wrong level of abstraction.run_in_actor()
can be implemented as a syntactic sugar on top ofActorNursery.start_actor()
+Portal.run()
usingtrio
tasks in a similar way to ourconcurrent.futures
worker pool exampleActorNursery
's teardown machinery is entirely superfluous and a path dependent legacy design which has a few pretty awful side effects:.run_in_actor()
portals.run_in_actor()
andPortal.run()
trio
nursery machinery instead of rolling our own 😂)ToDO
.run_in_actor()
style on top of the rest of the nursery APInested_multierrors()
test to use the.open_context()
/.run()
style and ensure we can still get as reliable of performance.run_in_actor()
API as a cluster helperThe text was updated successfully, but these errors were encountered: