dhcpkit.ipv6.server.nonblocking_pool module

A multiprocessing pool that doesn’t block when full. If we don’t do this then the queue fills up with old messages and the workers keep answering those while the client has probably already given up, instead of answering recent messages.

class dhcpkit.ipv6.server.nonblocking_pool.NonBlockingPool(processes=None, initializer=None, initargs=(), maxtasksperchild=None, context=None)[source]

Bases: multiprocessing.pool.Pool

A multiprocessing pool that doesn’t block when full

apply_async(func: Callable, args: Tuple = (), kwds: Dict = None, callback: Callable = None, error_callback: Callable = None)[source]

Asynchronous version of apply() method.