Jython, GILs and object locking.

Aahz aahz at pythoncraft.com
Sun Oct 19 11:08:56 EDT 2003


In article <l4hkb.104$ks2.24 at reader1.news.jippii.net>,
Harri Pesonen  <fuerte at sci.fi> wrote:
>Aahz wrote:
>> In article <FW7kb.63$MO7.35 at reader1.news.jippii.net>,
>> Harri Pesonen  <fuerte at sci.fi> wrote:
>>>Aahz wrote:
>>>>In article <NmBjb.253$en5.245 at reader1.news.jippii.net>,
>>>>Harri Pesonen  <fuerte at sci.fi> wrote:
>>>>>
>>>>>Why? Each thread has its own variables, they are not shared, there is no 
>>>>>need for synchronizing.
>>>>
>>>>Either you don't understand how Python currently works or you're talking
>>>>about implementing a completely different language that happens to share
>>>>syntax and some semantics with Python.  Which is it?
>>>
>>>Mostly the latter. It would be 99% compatible with the Python syntax, 
>>>the only difference would be in threading. But it would be 
>>>free-threading, not pseudo-threading as the current Python.
>> 
>> The point is that it would be at best 80% compatible with current
>> Python's semantics.  CPython doesn't have "variables", it has names and
>> objects; all objects are global within a single process.  Changing that
>> semantic has implications far beyond threading.  There's also the issue
>> that you keep refusing to address: making Python work with random
>> third-party libraries that aren't thread-safe or thread-hot.
>
>Sure Python has variables. You can call them objects if you like.
>
>Objects are global only within one interpreter state. You can have 
>several interpreter and thread states already in CPython.
>
>Only a few static objects are global within a single process.

Ah.  Looks like I guessed right the first time: you *DON'T* understand
how Python works.  Never mind.  Let me know if/when you want to get
educated by starting a new thread; I'm done wasting my time here.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"It is easier to optimize correct code than to correct optimized code."
--Bill Harlan




More information about the Python-list mailing list