How to use the multiprocessing.Process.__init__ function in multiprocessing

To help you get started, we’ve selected a few multiprocessing examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github csvance / armchair-expert / connectors / connector_common.py View on Github external
def __init__(self, name, read_queue: Queue, write_queue: Queue, shutdown_event: Event):
        Process.__init__(self, name=name)
        self._read_queue = read_queue
        self._write_queue = write_queue
        self._shutdown_event = shutdown_event
        self._frontend = None
github ericspod / Eidolon / eidolon / Concurrency.py View on Github external
def __init__(self,index,total,syncEvent,syncEvent2,syncCounter,syncLock,sharer,progress,stopEvent,parentPID):
        Process.__init__(self)
        self.index=index # which proc this is, 0<=index
github PiSchool / mxnet-tacotron / data_loader_multithread.py View on Github external
def __init__(self, audio_queue, result_queue):
        multiprocessing.Process.__init__(self)
        self.audio_queue = audio_queue
        self.result_queue = result_queue
github skelsec / pypykatz / pypykatz / remote / live / share / enumerator.py View on Github external
def __init__(self, outQ, out_file = None, to_json = False):
		Process.__init__(self)
		self.outQ = outQ
		self.results = {}
		self.errors = {}
		self.out_file = out_file
		self.to_json = to_json
github xychang / RecursiveHierarchicalClustering / calculateDistance.py View on Github external
def __init__(self, threadID, prefix, sid_seq, sfrom, sto, idfMap):
        self.threadID = threadID
        self.sid_seq = sid_seq
        self.sfrom = sfrom
        self.sto = sto
        self.idfMap = idfMap
        self.fo = open(prefix+'_'+str(sfrom[0]), 'w')
        multiprocessing.Process.__init__(self)
github ANRGUSC / Jupiter / circe / pricing_event / monitor.py View on Github external
def __init__(self):
        multiprocessing.Process.__init__(self)
github bernard357 / shellbot / shellbot / listener.py View on Github external
Example::

            def filter(event):

                # duplicate input stream
                my_queue.put(str(event))

                # change input stream
                event.text = event.text.title()

                return event

            listener = Listener(filter=filter)
        """
        Process.__init__(self)
        self.engine = engine
        self.filter = filter
github vatlab / varianttools / src / variant_tools / association_hdf5.py View on Github external
def __init__(self, geneDict, geneSet, fileQueue, project, group_names, job):
        Process.__init__(self)
        self.geneDict = geneDict
        self.geneSet = geneSet
        self.fileQueue = fileQueue
        self.proj = project
        self.group_names = group_names
        self.proc_index = job
github markfickett / dicehistogram / crop.py View on Github external
def __init__(self,
      filename_queue,
      result_queue,
      capture_dir,
      crop_dir,
      reference_filename,
      crop_size,
      analysis_resize_factor,
      diff_threshold,
      debug):
    multiprocessing.Process.__init__(self)
    self.daemon = True
    self._filename_queue = filename_queue
    self._result_queue = result_queue

    self._capture_dir = capture_dir
    self._crop_dir = crop_dir
    self._crop_size = crop_size
    self._scan_distance = 2 * crop_size / 5
    self._analysis_resize_factor = analysis_resize_factor
    if diff_threshold is None or diff_threshold < 1:
      raise ValueError('Bad diff_threshold: %r' % diff_threshold)
    self._diff_threshold = diff_threshold
    self._debug = debug
    self._reference_filename = reference_filename
github melbadry9 / ScanApi / lib / thirdparty / Gasset / asset.py View on Github external
def __init__(self, domain, shared=None):
        Base.__init__(self, domain)
        multiprocessing.Process.__init__(self)
        self.shared = shared