It would be nice to have a way to change the default WorkerContext, for example:
trio_parallel.set_default_context(WorkerContext(idle_timeout=math.inf))
I'd like to change the idle timeout globally. Currently, I'd have to open a worker context at the root nursery, and store that into a contextvar or something, and hope that everyone remembers to use that context.
The default parameters of WorkerContext are quite arbitrary, so I think it would make sense to have a way to change the default context.
It would be nice to have a way to change the default WorkerContext, for example:
I'd like to change the idle timeout globally. Currently, I'd have to open a worker context at the root nursery, and store that into a contextvar or something, and hope that everyone remembers to use that context.
The default parameters of
WorkerContextare quite arbitrary, so I think it would make sense to have a way to change the default context.