Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>"I checked it out and it looks good, but I also heard that processes, unlike threads, can't share a lot of information..."</strong></p> <p>This is only partially true.</p> <p>Threads are part of a process -- threads share memory trivially. Which is as much of a problem as a help -- two threads with casual disregard for each other can overwrite memory and create serious problems.</p> <p>Processes, however, share information through a lot of mechanisms. A Posix pipeline (<code>a | b</code>) means that process a and process b share information -- a writes it and b reads it. This works out really well for a lot things.</p> <p>The operating system will assign your processes to every available core as quickly as you create them. This works out really well for a lot of things.</p> <p>Stackless Python is unrelated to this discussion -- it's faster and has different thread scheduling. But I don't think threads are the best route for this.</p> <p><strong>"I think my program will need to share a lot of information."</strong></p> <p>You should resolve this first. Then, determine how to structure processes around the flow of information. A "pipeline" is very easy and natural to do; any shell will create the pipeline trivially.</p> <p>A "server" is another architecture where multiple client processes get and/or put information into a central server. This is a great way to share information. You can use the WSGI reference implementation as a way to build a simple, reliable server.</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