'Called at shutdown to tell processes that we\'re shutting down.'

@staticmethod
def _stop_task_handler(task_handler):

    for proc in task_handler.pool:
        try:
            setblocking(proc.inq._writer, 1)
        except (OSError, IOError):
            pass
        else:
            try:
                proc.inq.put(None)
            except OSError as exc:
                if (exc.errno != errno.EBADF):
                    raise
