Commit c9ed587c authored by Ross Girshick's avatar Ross Girshick Committed by Facebook Github Bot

Make data loader threads daemonic

Summary: Make data loader threads daemonic so the main process can exit when an exception is raised.

Reviewed By: ashwinb, newstzpz

Differential Revision: D9478059

fbshipit-source-id: 00bfaab51295b63c2f95ac1be99ae56a0ccf9d94
parent 47e457a5
...@@ -224,6 +224,7 @@ class RoIDataLoader(object): ...@@ -224,6 +224,7 @@ class RoIDataLoader(object):
def start(self, prefill=False): def start(self, prefill=False):
for w in self._workers + self._enqueuers: for w in self._workers + self._enqueuers:
w.setDaemon(True)
w.start() w.start()
if prefill: if prefill:
logger.info('Pre-filling mini-batch queue...') logger.info('Pre-filling mini-batch queue...')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment