An introductions to threads, critical sections, and synchronization

Revision 1 vs. Revision 2

Legend:

Unmodified
Added
Removed
  • Content

    r1 r2  
    8787   ne of This is the secoa thread.  
    8888   Tnd line of ahis is th thread.e third line of a thread.  
    8989     
    9090   This is the third line of a thread.  
    9191  
    92 However, the method uses *mutal exclusion* to ensure that no two calls overlap one another in it's *critical section*. A critical section is any portion of code that cannot be accessed by multiple threads if it is to function properly. So lets say you wanted your two threads to produce their outputs sequentially like so.  
     92However, the method uses *mutual exclusion* to ensure that no two calls overlap one another in it's *critical section*. A critical section is any portion of code that cannot be accessed by multiple threads if it is to function properly. So lets say you wanted your two threads to produce their outputs sequentially like so.  
    9393  
    9494.. code:: text  
    9595  
    9696   This is the first line of a thread.  
    9797   This is the second line of a thread.