…en execv is enabled
Patch by Charles-François Natali
- The with_*_thread arguments has also been replaced with a single `threads=True` argument. - Two new pool callbacks: - ``on_timeout_set(job, soft, hard)`` Applied when a task is executed with a timeout. - ``on_timeout_cancel(job)`` Applied when a timeout is cancelled (the job completed)
…id not immediately exit
…n-successful exitcodes (to work with maxtasksperchild etc)
By setting with_task_thread=False, or with_supervisor_thread=False. If supervisor is disabled then self.eventmap is updated with the fds of all pool processes sentinels pointing to self.maintain_pool. In addition to new callbacks has been added: on_process_created= and on_process_down= Both take a single argument, which is the Process instance created/lost, these callbacks can be used to update an event loop with new and removed process fds.
…lity to drain results using epoll/kqueue/select
…ues of maxtasksperchild into account.
This means that the supervisor can't restart processes faster than max_restart' times per max_restart_freq seconds. (like the Erlang supervisor maxR & maxT settings). The pool is closed and joined if the max restart frequency is exceeded. Previously it would keep restarting very quickly. The current default value is to stop if it exceeds 3 restarts in 60 seconds. This may have to be tweaked.