<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Jaimie,</p>
    <p>it is actually a one line change. If you visit <a
        moz-do-not-send="true"
href="https://hg.die-offenbachs.homelinux.org/eric/rev/1e498581a094"
        class="moz-txt-link-freetext">https://hg.die-offenbachs.homelinux.org/eric/rev/1e498581a094</a>
      you will see, which line needs to be removed.</p>
    <p>Regards,<br>
      Detlev<br>
    </p>
    <div class="moz-cite-prefix">Am 16.11.23 um 19:10 schrieb Jamie
      Riotto:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAM8_zTgYSBSgATSkvbNOx+nuAdTnLsGQ7=vsi7cC0RrVLz-5cA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <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"
            moz-do-not-send="true" class="moz-txt-link-freetext">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">
          <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>
            <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"
            moz-do-not-send="true" class="moz-txt-link-freetext">detlev@die-offenbachs.de</a></pre>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Detlev Offenbach
<a class="moz-txt-link-abbreviated" href="mailto:detlev@die-offenbachs.de">detlev@die-offenbachs.de</a></pre>
  </body>
</html>