On 08/15/2017 11:41 AM, Haining Yu wrote:
> If two python programs are running in two virtual environments on the
> same machine, are they processed by the same Global Interpreter Lock? 

No. The GIL is per-interpreter, thus per-process. Two different Python
processes will each have their own GIL (and thus be able to run
concurrently on different CPU cores), even if they are running from the
same virtualenv.

So virtualenv is not a workaround for the GIL, it's irrelevant. But
running multiple Python processes is a workaround for the GIL.

Carl

-- 
You received this message because you are subscribed to the Google Groups 
"virtualenv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python-virtualenv+unsubscr...@googlegroups.com.
To post to this group, send email to python-virtualenv@googlegroups.com.
Visit this group at https://groups.google.com/group/python-virtualenv.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to