Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p><a href="http://en.wikipedia.org/wiki/Thread_(computer_science)" rel="nofollow noreferrer">Multithreading</a> as a widespread programming and execution model allows multiple threads to exist within the context of a single process. These threads share the process' resources but are able to execute independently. The threaded programming model provides developers with a useful abstraction of concurrent execution. However, perhaps the most interesting application of the technology is when it is applied to a single process to enable parallel execution on a multiprocessor system.</p> </blockquote> <p>That means that a single <a href="http://en.wikipedia.org/wiki/Computer_process" rel="nofollow noreferrer">process</a> can have many different "functions" <a href="http://en.wikipedia.org/wiki/Execution_(computers)" rel="nofollow noreferrer">executing</a> <a href="http://en.wikipedia.org/wiki/Concurrency_(computer_science)" rel="nofollow noreferrer">concurrently</a>, allowing the application to better use the available hardware (multiple cores/processors). Threads can communicate between them (they have <a href="http://en.wikipedia.org/wiki/Memory_coherence" rel="nofollow noreferrer">shared memory</a>), but its a <a href="http://en.wikipedia.org/wiki/Deadlock" rel="nofollow noreferrer">hard problem</a> to have every thread <a href="http://en.wikipedia.org/wiki/Race_condition" rel="nofollow noreferrer">behave well</a> with <a href="http://en.wikipedia.org/wiki/Semaphore_(programming)" rel="nofollow noreferrer">others</a> when accesing shared objects/memory.</p> <p>Threading allows an application to remain responsive, without the use of a catch all application loop, when doing lengthy operations.</p> <p>For example, a non threaded <code>copy</code> program wouldn't allow you to do anything until the copy completes. </p> <p>Threading helps with complex, lenghty, independent problems, but brings along <a href="https://stackoverflow.com/questions/424952/are-single-threaded-applications-a-dead-technology/424980#424980">a lot more complexity</a>, that makes it hard even for seasoned developers.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload