<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Multi-Threading on mellowd.co.uk</title>
    <link>https://mellowd.co.uk/tags/multi-threading/</link>
    <description>Recent content in Multi-Threading on mellowd.co.uk</description>
    <generator>Hugo</generator>
    <language>en-gb</language>
    <lastBuildDate>Mon, 15 Dec 2014 13:27:43 +0000</lastBuildDate>
    <atom:link href="https://mellowd.co.uk/tags/multi-threading/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>When and when not to multithread</title>
      <link>https://mellowd.co.uk/post/when-and-when-not-to-multithread/</link>
      <pubDate>Mon, 15 Dec 2014 13:27:43 +0000</pubDate>
      <guid>https://mellowd.co.uk/post/when-and-when-not-to-multithread/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://mellowd.co.uk/ccie/?p=5807&#34;&gt;At the end of my last post on Python multithreading, I said my example was not the best.&lt;/a&gt; Let me expand some more on this.&lt;/p&gt;
&lt;p&gt;While testing code in the &lt;a href=&#34;https://mellowd.co.uk/ccie/?p=5807&#34;&gt;previous post&lt;/a&gt;, I noticed that certain code was slower when multiple threads were running. Also these threads are not tied to a CPU. If we were talking about a bigger applications in which we wanted to ensure multiple threads were on different CPUs, &lt;a href=&#34;http://blog.programster.org/2014/12/14/python-multithreading-you-could-be-wasting-time/&#34;&gt;you are in fact looking for multiprocessing.&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Basic Python Multithreading</title>
      <link>https://mellowd.co.uk/post/basic-python-multithreading/</link>
      <pubDate>Fri, 12 Dec 2014 16:27:19 +0000</pubDate>
      <guid>https://mellowd.co.uk/post/basic-python-multithreading/</guid>
      <description>&lt;p&gt;The first ‘proper’ Python app I made logged onto a list of devices and pulled out OSPF state. This worked perfectly fine. The app correctly works out whether it can log into a device or not, and waits a few seconds to ensure a device actually responds.&lt;/p&gt;
&lt;p&gt;The issue is that if I have a list of say 1000 devices, and 500 of them don’t respond, the amount of time you need to wait rapidly increases as it looks at each one in turn. Would it not be better for the app to be able to log into multiple devices at the same time in parallel? This would drastically reduce the runtime.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
