News for hackers. Stuff that matters.
Re:Presentation on the new Python GIL by kingkilr on Sunday January 17, 2010 @03:13PM (#1058860)
Because CPython doesn't want to invent it's own scheduler (and various other things that your operating system already does for you), further multiple threads can be active at the same time if they're doing any operations that release the GIL (such as I/O), Python can't know whether your thread will do any I/O before you create it.
Re:Presentation on the new Python GIL by scott_s on Sunday January 17, 2010 @10:02PM (#1059356)
However, the approach explained in this presentation does just that. The solution looks like a crude process operating systems scheduler.
Re:Presentation on the new Python GIL by kingkilr on Monday January 18, 2010 @02:17AM (#1059576)
It's not really, it's simply threads asking the main thread to drop every 5 ms, and then relying on the OS to schedule them. If Python had it's own scheduler it would do things like assigning priorities and actually deciding which thread would take over when the GIL was dropped.