On Sun, 11 Jun 2017 04:21 pm, Stefan Behnel wrote: > Serhiy Storchaka schrieb am 11.06.2017 um 07:11: >> And also GIL is used for guaranteeing atomicity of many operations and >> consistencity of internal structures without using additional locks. Many >> parts of the core and the stdlib would just not work correctly in >> multithread environment without GIL. > > And the same applies to external extension modules. The GIL is really handy > when it comes to reasoning about safety and correctness of algorithms under > the threat of thread concurrency. Especially in native code, where the > result of an unanticipated race condition is usually a crash rather than an > exception.
Thank you Stefan and Serhiy! I'm tired of people complaining about the GIL as a "mistake" without acknowledging that it exists for a reason. -- Steve “Cheer up,” they said, “things could be worse.” So I cheered up, and sure enough, things got worse. -- https://mail.python.org/mailman/listinfo/python-list