Chris Angelico wrote: > On Mon, May 25, 2020 at 7:58 PM [email protected] > wrote: > > > > Edwin Zimmerman wrote: > > Only if your workload is CPU bound. Python optimizes IO bound workload > > performance by > > releasing the GIL while doing IO. Green threads generally do not offer > > this option. > > Real threads is not needed in Python: > > 1) Real threads do not work parallel > > They do when they do any sort of blocking operation. > > 2) Real threads only consume resources of OS > > 3) Real threads have also as trade off context switching between threads > > (small but > > ...) > > Not enough to be a concern. > > I think considering this trade offs we should switch > > Real Thread -> Green Thread internally or provide alternative functionality > > ... > > I think asyncio already provide functionality of GreenThread ... > > Okay maybe we should leave Real Threads as it is ... I need to think about > > it ... > > Yes, leave real threads as is, thanks. They're pretty important actually. > If you don't want to use threads, that's fine, but don't change the > threading module to not be threads. Not really a lot of point breaking > backward compatibility for, uhh, zero gain. > ChrisA
I like the topic on https://www.reddit.com/r/Python/comments/bpp9hg/has_the_python_gil_been_slain_subinterpreters_in/ Answer written by CSI_Tech_Dept: ``` ... What probably needs to be done is to have a compile option that causes Python to work without GIL but at the cost of breaking some of API (this would especially broke C API), then developers would have an option to chose: compatibility with GIL no GIL, full multithreading, but broken compatibility If user could decide which python version to use and there was a clear benefit, existing applications would be migrated, people would also make sure their code works with both versions. ... ``` Interesting thoughts ... _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/NIRAP5KUE2C7N5TI52IX44QNDJVQUTSC/ Code of Conduct: http://python.org/psf/codeofconduct/
