(self, background=False)
Method to start the worker.
		
		Parameters
		----------
			background: bool
				If set to False (Default). the worker is executed in the current thread.
				If True, a new daemon thread is created that runs the worker. This is
				useful in a single worker scenario/when the compute function only simulates
				work.
Method to start the worker.
		
		Parameters
		----------
			background: bool
				If set to False (Default). the worker is executed in the current thread.
				If True, a new daemon thread is created that runs the worker. This is
				useful in a single worker scenario/when the compute function only simulates
				work.
Method to start the worker . Parameters ---------- background : bool If set to False ( Default ) . the worker is executed in the current thread . If True a new daemon thread is created that runs the worker . This is useful in a single worker scenario / when the compute function only simulates work .
def run(self, background=False):
		"""
		Method to start the worker.
		
		Parameters
		----------
			background: bool
				If set to False (Default). the worker is executed in the current thread.
				If True, a new daemon thread is created that runs the worker. This is
				useful in a single worker scenario/when the compute function only simulates
				work.
		"""
		if background:
			self.worker_id += str(threading.get_ident())
			self.thread = threading.Thread(target=self._run, name='worker %s thread'%self.worker_id)
			self.thread.daemon=True
			self.thread.start()
		else:
			self._run()
def run ( self , background = False ) : if background : self . worker_id += str ( threading . get_ident ( ) ) self . thread = threading . Thread ( target = self . _run , name = 'worker %s thread' % self . worker_id ) self . thread . daemon = True self . thread . start ( ) else : self . _run ( )