title: Getting OSError: [WinError 6] The handle is invalid
body: <p>im running my function with multiprocessing implementation</p>
  <pre class="lang-py prettyprint-override"><code>def assign_task(self, module, command):
          logging.debug(&quot;Assigning task for {0}&quot;.format(command._get_module_id()))
          if self.queue is None:
              self.queue = JoinableQueue()
          if self.processes is None:
              self.processes = [Process(target=self.do_execute) for i in range(self.max_process)]
              for process in self.processes:
                  process.daemon = True
                  process.start()
  
          logging.debug(&quot;Queuing message {0}&quot;.format(command._get_module_id()))
          self.queue.put((module, command))
  
      def do_execute(self):
          # the code
  </code></pre>
  <p>but getting this error</p>
  <pre><code>Traceback (most recent call last):
    File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
    File &quot;C:\Users\muhammad.aqshol\AppData\Local\Programs\Python\Python38\lib\multiprocessing\spawn.py&quot;, line 107, in spawn_main
      new_handle = reduction.duplicate(pipe_handle,
    File &quot;C:\Users\muhammad.aqshol\AppData\Local\Programs\Python\Python38\lib\multiprocessing\reduction.py&quot;, line 79, in duplicate
      return _winapi.DuplicateHandle(
  OSError: [WinError 6] The handle is invalid
  </code></pre>
  <p>Am i wrong on the implementation or something missing?</p>