def __init__(self, build_request_handler): """ :type build_request_handler: BuildRequestHandler """ self._logger = get_logger(__name__) self._build_request_handler = build_request_handler self._idle_slaves = OrderedSetQueue() self._allocation_thread = SafeThread( target=self._slave_allocation_loop, name='SlaveAllocationLoop', daemon=True)