By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,035 Members | 1,388 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,035 IT Pros & Developers. It's quick & easy.

GIL release

P: n/a
Hi,
Does anyone know whether there is a way for a python thread to release
the global interpreter lock, and let all other threads have a chance at
running before re-acquiring it? Does the thread scheduling follow a
round-robin method?

Thanks,
agb.
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Alastair Basden wrote:
Hi,
Does anyone know whether there is a way for a python thread to release
the global interpreter lock, and let all other threads have a chance at
running before re-acquiring it? Does the thread scheduling follow a
round-robin method?
The thread itself are scheduled by the OS ... the access to the GIL is
managed by 'cooperative scheduling'.

--Armin

Thanks,
agb.

Jul 18 '05 #2

P: n/a
Do you mean in Python or in C ?

In C this is described in details in the documentation. In Python, I
don't think there is a way ! If you want to do so you'll want to use a
micro sleep ...

Pierre

Alastair Basden a écrit :
Hi,
Does anyone know whether there is a way for a python thread to release
the global interpreter lock, and let all other threads have a chance at
running before re-acquiring it? Does the thread scheduling follow a
round-robin method?

Thanks,
agb.

Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.