Idea for removing the GIL..

55 views
Skip to first unread message

Vishal

unread,
Feb 8, 2011, 4:35:39 AM2/8/11
to Unladen Swallow, vsap...@gmail.com
Hello,

This might sound crazy..and dont know if its even possible, but...

Is it possible that the Python process, creates copies of the
interpreter for each thread that is launched, and some how the thread
is bound to its own interpreter ?

This will increase the python process size...for sure, however data
sharing will remain just like it is in threads.

and it "may" also allow the two threads to run in parallel, assuming
the processors of today can send independent instructions from the
same process to multiple cores?

Comments, suggestions, brush offs are welcome :))

Thanks and best regards,
Vishal Sapre

Reid Kleckner

unread,
Feb 8, 2011, 11:13:32 PM2/8/11
to Vishal, Unladen Swallow
On Tue, Feb 8, 2011 at 4:35 AM, Vishal <vsap...@gmail.com> wrote:
> Hello,
>
> This might sound crazy..and dont know if its even possible, but...
>
> Is it possible that the Python process, creates copies of the
> interpreter for each thread that is launched, and some how the thread
> is bound to its own interpreter ?

No, not if they're going to share memory and operate on the same
Python objects. One of the linchpins of the GIL in CPython is
updating refcounts, which empirically does require some form of
synchronization.

Reply all
Reply to author
Forward
0 new messages