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
this is a rough outline of supporting async hook calls and awaitable results in
the starting point will be a async hook caller that will call sync and async hook, deferring all awaitables to the event loop
nesting like async->sync->async will trigger failures when awaitables are encountered in the inner loop
the next level will be deferring all sync calls to a thread executor
any sync call that triggers a awaitable, will steal one thread of that pool , this is considered acceptable as execution is typically expected to be fairly non-concurrent (based on pytest)
a own threadpool with a maxium size of 10 ? shal be used (this accounts for the expectation that hooks run in order and should not nest to arbitrary levels)
nonblocking sync hooks may be marked as nonblocking
in which case they may run in the mainloop, as before nesting async into sync will trigger errros
the primary use case for nonblocking sync hooks is to support being nested into other legacy hooks without causing issues but transparently working with modern hook calls
The text was updated successfully, but these errors were encountered:
cc @simonw
this is a rough outline of supporting async hook calls and awaitable results in
the starting point will be a async hook caller that will call sync and async hook, deferring all awaitables to the event loop
nesting like
async->sync->async
will trigger failures when awaitables are encountered in the inner loopthe next level will be deferring all sync calls to a thread executor
any sync call that triggers a awaitable, will steal one thread of that pool , this is considered acceptable as execution is typically expected to be fairly non-concurrent (based on pytest)
a own threadpool with a maxium size of 10 ? shal be used (this accounts for the expectation that hooks run in order and should not nest to arbitrary levels)
nonblocking sync hooks may be marked as nonblocking
in which case they may run in the mainloop, as before nesting async into sync will trigger errros
the primary use case for nonblocking sync hooks is to support being nested into other legacy hooks without causing issues but transparently working with modern hook calls
The text was updated successfully, but these errors were encountered: