<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Thread Safety in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Thread-Safety/m-p/885233#M3491</link>
    <description>&amp;gt;&amp;gt;the software can perform more than one action at a time without crashing.&lt;BR /&gt;&lt;BR /&gt;The preponderance of effects of un-thread-safe programming is incorrect results - not program crash.&lt;BR /&gt;&lt;BR /&gt;In many cases you will find the probability of error so low that errors in output is not noticed during development testing, only to find later during production that such an error exists. An un-seasoned developer will assume a position of: "this cannot possibly be a coding error on my part".&lt;BR /&gt;&lt;BR /&gt;Some thread-unsafe coding may never exhibit an error, or will not show an error for years of operation. While thread-safety issues can be exposed by riggorous stress testing and/or by modern tools and practices, you should not become lax and avoid the thurough walk-through of your code with the comprehension of what the other threads (and activity) may be doing at the time of execution of the code under review. Keeping in mind that the code you see in source form is not the code the computer sees at run time.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey</description>
    <pubDate>Fri, 06 Apr 2012 13:14:52 GMT</pubDate>
    <dc:creator>jimdempseyatthecove</dc:creator>
    <dc:date>2012-04-06T13:14:52Z</dc:date>
    <item>
      <title>Thread Safety</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Thread-Safety/m-p/885227#M3485</link>
      <description>What does the term thread-safe exactly mean? Pls explain..</description>
      <pubDate>Fri, 30 Nov 2007 12:22:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Thread-Safety/m-p/885227#M3485</guid>
      <dc:creator>ashoksaravanan</dc:creator>
      <dc:date>2007-11-30T12:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Thread Safety</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Thread-Safety/m-p/885228#M3486</link>
      <description>Much good material comes right up in any web search.&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Nov 2007 13:45:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Thread-Safety/m-p/885228#M3486</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2007-11-30T13:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Thread Safety</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Thread-Safety/m-p/885229#M3487</link>
      <description>&lt;P&gt;Ashok,&lt;/P&gt;
&lt;P&gt;Generally thread-safe means your code will not break due to unexpected changes to variables that are shared between threads but where the code was never written with consideration that multiple threads may concurrently be executing the code.&lt;/P&gt;
&lt;P&gt;A good and simple example of this would be code that manages a linked list. The extraction might look like:&lt;/P&gt;
&lt;P&gt;node = head;&lt;BR /&gt;if(node) head = node.next;&lt;/P&gt;
&lt;P&gt;This looks safe enough but what if thread A picks up the head node, then before updating the head pointer thread B inserts a new head node, then thread A updates the head node with node.next. Under this circumstance the node inserted by B would be lost. &lt;/P&gt;
&lt;P&gt;This two line code example is not thread safe. The window of error opportunity is quite small in this code exampleand may not be noticed for a long time. And may not be noticed during debugging. It might only occure once the code passes verification test and gets into the field. &lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2007 17:50:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Thread-Safety/m-p/885229#M3487</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2007-11-30T17:50:41Z</dc:date>
    </item>
    <item>
      <title>Thread Safety</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Thread-Safety/m-p/885230#M3488</link>
      <description>Hello&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Its not much complecated. visit here to know about &lt;A href="http://www.dapfor.com/en/net-suite/net-grid/features/thread-safe-application"&gt;thread safety&lt;/A&gt;</description>
      <pubDate>Fri, 16 Mar 2012 10:58:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Thread-Safety/m-p/885230#M3488</guid>
      <dc:creator>robew</dc:creator>
      <dc:date>2012-03-16T10:58:01Z</dc:date>
    </item>
    <item>
      <title>Thread Safety</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Thread-Safety/m-p/885231#M3489</link>
      <description>&lt;DIV id="tiny_quote"&gt;&lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A jquery1331902874546="58" rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=284267" href="https://community.intel.com/en-us/profile/284267/" class="basic"&gt;ashoksaravanan&lt;/A&gt;&lt;/DIV&gt;&lt;DIV style="background-color: #e5e5e5; margin-left: 2px; margin-right: 2px; border: 1px inset; padding: 5px;"&gt;&lt;I&gt;What does the term thread-safe exactly mean? Pls explain.. &lt;/I&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;Consider a financial software that does one transaction in a multi-threaded environment ( many users are&lt;BR /&gt;using software at the same time ):&lt;BR /&gt;&lt;BR /&gt; Transfer $1 from AccountA to AccountB.&lt;BR /&gt;&lt;BR /&gt;It will be athread-safetransaction onlyin one case if the transaction is not interrupted until it is completed.&lt;BR /&gt;A pseudo-code could look like:&lt;BR /&gt;&lt;BR /&gt; ISOLATION LEVEL: Set to Exclusive&lt;BR /&gt; BEGIN TRANSACTION&lt;BR /&gt;AccountA: -$1&lt;BR /&gt;AccountB: +$1&lt;BR /&gt; COMMIT if everything is OK, or ROLLBACK in case of an error&lt;BR /&gt; ISOLATION LEVEL: Set to Shared&lt;BR /&gt;&lt;BR /&gt;That scheme guarantees that the balance of a financial organizationis correct at the end of thetransaction. In&lt;BR /&gt;overall, some set of synchronization objects has to be used, like mutexes, critical sections, events, or&lt;BR /&gt;semaphors, to isolate some piece of codeor adatabase datafrom simultaneous modifications from different threads ( users ).&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Sergey&lt;/P&gt;</description>
      <pubDate>Fri, 16 Mar 2012 13:21:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Thread-Safety/m-p/885231#M3489</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-03-16T13:21:22Z</dc:date>
    </item>
    <item>
      <title>Thread Safety</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Thread-Safety/m-p/885232#M3490</link>
      <description>Practicing thread-safety is the process of writing source code that is multi-thread safe; meaning, the software can perform more than one action at a time without crashing. The theory and practice can be a bit complicated, depending on the language you are using. C/C++ has multiple libraries available to introduce threading capability, while C# and Java were designed to be thread-safe from the ground up. Hope this helps.&lt;BR /&gt;&lt;BR /&gt;CCK</description>
      <pubDate>Fri, 30 Mar 2012 02:41:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Thread-Safety/m-p/885232#M3490</guid>
      <dc:creator>Christopher_K_</dc:creator>
      <dc:date>2012-03-30T02:41:04Z</dc:date>
    </item>
    <item>
      <title>Thread Safety</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Thread-Safety/m-p/885233#M3491</link>
      <description>&amp;gt;&amp;gt;the software can perform more than one action at a time without crashing.&lt;BR /&gt;&lt;BR /&gt;The preponderance of effects of un-thread-safe programming is incorrect results - not program crash.&lt;BR /&gt;&lt;BR /&gt;In many cases you will find the probability of error so low that errors in output is not noticed during development testing, only to find later during production that such an error exists. An un-seasoned developer will assume a position of: "this cannot possibly be a coding error on my part".&lt;BR /&gt;&lt;BR /&gt;Some thread-unsafe coding may never exhibit an error, or will not show an error for years of operation. While thread-safety issues can be exposed by riggorous stress testing and/or by modern tools and practices, you should not become lax and avoid the thurough walk-through of your code with the comprehension of what the other threads (and activity) may be doing at the time of execution of the code under review. Keeping in mind that the code you see in source form is not the code the computer sees at run time.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey</description>
      <pubDate>Fri, 06 Apr 2012 13:14:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Thread-Safety/m-p/885233#M3491</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2012-04-06T13:14:52Z</dc:date>
    </item>
  </channel>
</rss>

