<div dir="ltr">Detlev,<div>Excuse my ignorance, but I'm not sure how to obtain a changeset through mercurial. Is there an easy way?</div><div>- j</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 16, 2023 at 9:12 AM Detlev Offenbach <<a href="mailto:detlev@die-offenbachs.de">detlev@die-offenbachs.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>

  
    
  
  <div>
    <p>Hi,</p>
    <p>I just committed changeset 1e498581a094, which should fix the issue. Please give it a try and let me know. Otherwise, it will be contained in release 23.12 as is.</p>
    <p>Regards,
Detlev
</p>
    <p></p>
    <div>Am 15.11.23 um 16:33 schrieb Jamie
      Riotto:<br>
    </div>
    <blockquote type="cite">
      <div>import multiprocessing<br>
        from time import time<br>
        import random<br>
        <br>
        <br>
        def parallelSim(job_queue, output_queue):<br>
            for data in iter(job_queue.get, 'STOP'):<br>
                choices = random.choices(data, k=10)<br>
                total = 0<br>
                for i, c in enumerate(choices):<br>
                    sign = 1 if i%2==0 else -1<br>
                    total += c * c * sign<br>
        <br>
                output_queue.put(total)<br>
        <br>
        if __name__ == '__main__':<br>
            start_time = time()<br>
        <br>
            job_queue = multiprocessing.Queue()<br>
            output_queue = multiprocessing.Queue()<br>
        <br>
            # create some data<br>
            data = list(range(1, 1000))<br>
        <br>
            # DEBUG<br>
            #numCPUs = multiprocessing.cpu_count()<br>
            numCPUs = 4<br>
            iterations = 10<br>
            numjobs = numCPUs * iterations<br>
        <br>
            # load up the job queue<br>
            for sim in range(numjobs):<br>
                job_queue.put(data)<br>
        <br>
            # add Stops to the job queue<br>
            for x in range(numCPUs):<br>
                job_queue.put('STOP')<br>
        <br>
            serialDebug = False<br>
            if serialDebug is True:<br>
                # Debug the Parallel Process<br>
                parallelSim(job_queue, output_queue)<br>
        <br>
            else:<br>
                # parallelize processing using a pool of processes<br>
                for i in range(numCPUs):<br>
                    multiprocessing.Process(target=parallelSim,
        args=(job_queue, output_queue)).start()<br>
        <br>
            results = []<br>
            for r in range(numjobs):<br>
                results.append(output_queue.get())<br>
        <br>
            avg_result = sum(results) / numjobs<br>
            print("")<br>
            print(f'Average Results = {avg_result}')<br>
        <br>
            end_time = time()<br>
            elapsed = end_time - start_time<br>
            print(f"Finished in: {elapsed:.3f} seconds")<br>
      </div>
    </blockquote>
    <pre cols="72">-- 
Detlev Offenbach
<a href="mailto:detlev@die-offenbachs.de" target="_blank">detlev@die-offenbachs.de</a></pre>
  </div>

</blockquote></div>