Re: I just killed GIL!!!

2008-04-21 Thread Carl Banks
On Apr 21, 9:20 am, [EMAIL PROTECTED] (Aahz) wrote: > In article <[EMAIL PROTECTED]>, > Carl Banks <[EMAIL PROTECTED]> wrote: > > > > >On Apr 20, 10:57 pm, [EMAIL PROTECTED] (Aahz) wrote: > >> In article <[EMAIL PROTECTED]>, > >> Carl Banks <[EMAIL PROTECTED]> wrote: > >>>On Apr 17, 3:37 am, Jona

Re: I just killed GIL!!!

2008-04-21 Thread Aahz
In article <[EMAIL PROTECTED]>, Carl Banks <[EMAIL PROTECTED]> wrote: >On Apr 20, 10:57 pm, [EMAIL PROTECTED] (Aahz) wrote: >> In article <[EMAIL PROTECTED]>, >> Carl Banks <[EMAIL PROTECTED]> wrote: >>>On Apr 17, 3:37 am, Jonathan Gardner <[EMAIL PROTECTED]> >>>wrote: Using 100% of the

Re: I just killed GIL!!!

2008-04-21 Thread Carl Banks
On Apr 20, 10:57 pm, [EMAIL PROTECTED] (Aahz) wrote: > In article <[EMAIL PROTECTED]>, > Carl Banks <[EMAIL PROTECTED]> wrote: > > >On Apr 17, 3:37 am, Jonathan Gardner <[EMAIL PROTECTED]> > >wrote: > > >> Using 100% of the CPU is a bug, not a feature. > > >No it isn't. That idea is borne of the

Re: I just killed GIL!!!

2008-04-20 Thread Aahz
In article <[EMAIL PROTECTED]>, Carl Banks <[EMAIL PROTECTED]> wrote: >On Apr 17, 3:37 am, Jonathan Gardner <[EMAIL PROTECTED]> >wrote: >> >> Using 100% of the CPU is a bug, not a feature. > >No it isn't. That idea is borne of the narrowmindedness of people who >write server-like network apps. W

Re: I just killed GIL!!!

2008-04-19 Thread sturlamolden
On Apr 19, 10:29 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > FWIW, NT's POSIX subsytem fork() uses (or used to use) the NULL > SectionHandle method and was POSIX certified, so it's certainly > possible. Windows Vista Ultimate comes with Interix integrated, renamed 'Subsystem for Unix bas

Re: I just killed GIL!!!

2008-04-19 Thread [EMAIL PROTECTED]
On Apr 18, 9:29 pm, sturlamolden <[EMAIL PROTECTED]> wrote: > On 18 Apr, 21:28, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > Passing a NULL SectionHandle to NTCreateProcess/CreateProcessEx > > results in a fork-style copy-on-write duplicate of the current process. > > I know about NtCreateP

Re: I just killed GIL!!!

2008-04-18 Thread sturlamolden
On 18 Apr, 21:28, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Passing a NULL SectionHandle to NTCreateProcess/CreateProcessEx > results in a fork-style copy-on-write duplicate of the current process. I know about NtCreateProcess and ZwCreateProcess, but they just create an empty process - no

Re: I just killed GIL!!!

2008-04-18 Thread [EMAIL PROTECTED]
On Apr 17, 10:30 am, sturlamolden <[EMAIL PROTECTED]> wrote: > On 17 Apr, 15:21, "Martin P. Hellwig" <[EMAIL PROTECTED]> wrote: > > > If not, what is the advantage above already present solutions? > > Well... I like the processing module. Except that Wintendo toy OS has > no fork() availabe for the

Re: I just killed GIL!!!

2008-04-18 Thread Rhamphoryncus
On Apr 18, 4:30 am, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > Rhamphoryncus <[EMAIL PROTECTED]> wrote: > > On Apr 17, 7:40 am, Steve Holden <[EMAIL PROTECTED]> wrote: > > > I'd love to be wrong about that, but the GIL *has* been the subject of > > > extensive efforts to kill it over the last fi

Re: I just killed GIL!!!

2008-04-18 Thread Nick Craig-Wood
Rhamphoryncus <[EMAIL PROTECTED]> wrote: > On Apr 17, 7:40 am, Steve Holden <[EMAIL PROTECTED]> wrote: > > I'd love to be wrong about that, but the GIL *has* been the subject of > > extensive efforts to kill it over the last five years, and it has > > survived despite the best efforts of the devel

Re: I just killed GIL!!!

2008-04-17 Thread Martin v. Löwis
> An there you have the answer. It's really very simple :-) I'm fairly skeptical that it actually works. If the different Python interpreters all import the same extension module (say, _socket.pyd), windows won't load the DLL twice, but only one time. So you end up with a single copy of _socket, w

Re: I just killed GIL!!!

2008-04-17 Thread Carl Banks
On Apr 17, 1:03 pm, Jonathan Gardner <[EMAIL PROTECTED]> wrote: > On Apr 17, 1:18 am, Carl Banks <[EMAIL PROTECTED]> wrote: > > > On Apr 17, 3:37 am, Jonathan Gardner <[EMAIL PROTECTED]> > > wrote: > > > If you can't rewrite > > > your algorithm to be disk or network bound, next optimization step i

Re: I just killed GIL!!!

2008-04-17 Thread sturlamolden
On Apr 17, 7:16 pm, Jonathan Gardner <[EMAIL PROTECTED]> wrote: > On Apr 17, 8:19 am, sturlamolden <[EMAIL PROTECTED]> wrote: > > > > > An there you have the answer. It's really very simple :-) > > That's an interesting hack. > > Now, how do the processes communicate with each other without steppin

Re: I just killed GIL!!!

2008-04-17 Thread Rhamphoryncus
On Apr 17, 11:05 am, sturlamolden <[EMAIL PROTECTED]> wrote: > On Apr 17, 6:03 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > > > Interesting. Windows specific, but there's other ways to do the same > > thing more portably. > > I believe you can compile Python as a shared object (.so) on Linux as

Re: I just killed GIL!!!

2008-04-17 Thread Jonathan Gardner
On Apr 17, 9:48 am, sturlamolden <[EMAIL PROTECTED]> wrote: > On Apr 17, 5:46 pm, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > > > Have you tackled the communication problem? The way I see it, one > > interpreter cannot "see" objects created in the other because they > > have separate pools of ... e

Re: I just killed GIL!!!

2008-04-17 Thread Jonathan Gardner
On Apr 17, 8:19 am, sturlamolden <[EMAIL PROTECTED]> wrote: > > An there you have the answer. It's really very simple :-) > That's an interesting hack. Now, how do the processes communicate with each other without stepping on each other's work and without using a lock? Once you get that solved,

Re: I just killed GIL!!!

2008-04-17 Thread Jonathan Gardner
On Apr 17, 6:40 am, Steve Holden <[EMAIL PROTECTED]> wrote: > I'd love to be wrong about that, but the GIL *has* been the subject of > extensive efforts to kill it over the last five years, and it has > survived despite the best efforts of the developers. > To add to that... In my mind, I see thr

Re: I just killed GIL!!!

2008-04-17 Thread sturlamolden
On Apr 17, 6:03 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > Interesting. Windows specific, but there's other ways to do the same > thing more portably. I believe you can compile Python as a shared object (.so) on Linux as well, and thus loadable by ctypes. > The bigger issue is that you can'

Re: I just killed GIL!!!

2008-04-17 Thread Jonathan Gardner
On Apr 17, 1:18 am, Carl Banks <[EMAIL PROTECTED]> wrote: > On Apr 17, 3:37 am, Jonathan Gardner <[EMAIL PROTECTED]> > wrote: > > If you can't rewrite > > your algorithm to be disk or network bound, next optimization step is > > C. > > I'm sorry, but I don't like being told to use C. Perhaps I wou

Re: I just killed GIL!!!

2008-04-17 Thread sturlamolden
On Apr 17, 5:46 pm, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > Have you tackled the communication problem? The way I see it, one > interpreter cannot "see" objects created in the other because they > have separate pools of ... everything. They can communicate by > passing serialized objects thro

Re: I just killed GIL!!!

2008-04-17 Thread Rhamphoryncus
On Apr 17, 7:40 am, Steve Holden <[EMAIL PROTECTED]> wrote: > I'd love to be wrong about that, but the GIL *has* been the subject of > extensive efforts to kill it over the last five years, and it has > survived despite the best efforts of the developers. Yo. http://code.google.com/p/python-safet

Re: I just killed GIL!!!

2008-04-17 Thread Rhamphoryncus
On Apr 17, 9:19 am, sturlamolden <[EMAIL PROTECTED]> wrote: > On 17 Apr, 10:25, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > > help progress at all. I think neither was the case in this thread - > > the guy claimed that he actually did something about the GIL, and > > now we are all waiting for

Re: I just killed GIL!!!

2008-04-17 Thread Tim Daneliuk
MRAB wrote: > On Apr 17, 5:22 am, Torsten Bronger <[EMAIL PROTECTED]> > wrote: >> Hallöchen! >> >> Tim Daneliuk writes: >>> Daniel Fetchinson wrote: [...] > I just had one moment of exceptional clarity, during which > realized how I could get the GIL out of my way... It's so > simp

Re: I just killed GIL!!!

2008-04-17 Thread Hrvoje Niksic
sturlamolden <[EMAIL PROTECTED]> writes: > If I use my main interpreter to delegate a task to one of its > embedded 'children', its GIL will be released while it is waiting > for the answer. Associating each embedded interpreter with a > threading.Thread is all that remains. The GIL is released wh

Re: I just killed GIL!!!

2008-04-17 Thread MRAB
On Apr 17, 5:22 am, Torsten Bronger <[EMAIL PROTECTED]> wrote: > Hallöchen! > > Tim Daneliuk writes: > > Daniel Fetchinson wrote: > > >> [...] > > >>> I just had one moment of exceptional clarity, during which > >>> realized how I could get the GIL out of my way... It's so > >>> simple, I cannot he

Re: I just killed GIL!!!

2008-04-17 Thread sturlamolden
On 17 Apr, 10:12, Steve Holden <[EMAIL PROTECTED]> wrote: > Quick, write it down before the drugs wear off. Hehe, I don't take drugs, apart from NSAIDs for arthritis. Read my answer to Martin v. Löwis. -- http://mail.python.org/mailman/listinfo/python-list

Re: I just killed GIL!!!

2008-04-17 Thread sturlamolden
On 17 Apr, 09:11, Matias Surdi <[EMAIL PROTECTED]> wrote: > It's april 1st again??? Not according to my calendar. This was not meant as a joke. I think I may have solved the GIL issue. See my answer to Martin v. Löwis for a full explanation. -- http://mail.python.org/mailman/listinfo/python-lis

Re: I just killed GIL!!!

2008-04-17 Thread sturlamolden
On 17 Apr, 10:25, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > help progress at all. I think neither was the case in this thread - > the guy claimed that he actually did something about the GIL, and > now we are all waiting for him to also tell us what it is that he > did. Ok, I did not remove

Re: I just killed GIL!!!

2008-04-17 Thread sturlamolden
On 17 Apr, 15:21, "Martin P. Hellwig" <[EMAIL PROTECTED]> wrote: > If not, what is the advantage above already present solutions? Well... I like the processing module. Except that Wintendo toy OS has no fork() availabe for the Win32 subsystem, which makes it a bit limited on that platform (slow a

Re: I just killed GIL!!!

2008-04-17 Thread Steve Holden
Martin v. Löwis wrote: >> For the record, I am not complaining about that GIL. As I said, I >> understand and approve of why it's there. I am, however, complaining >> about attitude that if you want to be free of the GIL you're doing >> something wrong. > > If you _want_ to be free of the GIL, y

Re: I just killed GIL!!!

2008-04-17 Thread Martin P. Hellwig
sturlamolden wrote: You killed the GIL, you bastard! :-) > Hello Guys... > > I just had one moment of exceptional clarity, during which realized > how I could get the GIL out of my way... It's so simple, I cannot help > wondering why nobody has thought of it before. Duh! Now I am going to > sit

Re: I just killed GIL!!!

2008-04-17 Thread Chris
On Apr 17, 11:49 am, Marco Mariani <[EMAIL PROTECTED]> wrote: > Torsten Bronger wrote: > >>> If I were you I would keep it a secret until a Hollywood producer > >>> offers big bucks for the film rights. > >> Who would play Guido, I wonder? > > > Ralf Möller.  No other. > > And the GIL killer? > > C

Re: I just killed GIL!!!

2008-04-17 Thread Marco Mariani
Torsten Bronger wrote: >>> If I were you I would keep it a secret until a Hollywood producer >>> offers big bucks for the film rights. >> Who would play Guido, I wonder? > > Ralf Möller. No other. And the GIL killer? Clive Owen, Matt Damon, Mark Wahlberg? -- http://mail.python.org/mailman/lis

Re: I just killed GIL!!!

2008-04-17 Thread Martin v. Löwis
> For the record, I am not complaining about that GIL. As I said, I > understand and approve of why it's there. I am, however, complaining > about attitude that if you want to be free of the GIL you're doing > something wrong. If you _want_ to be free of the GIL, you are not _doing_ anything, an

Re: I just killed GIL!!!

2008-04-17 Thread Carl Banks
On Apr 17, 3:37 am, Jonathan Gardner <[EMAIL PROTECTED]> wrote: > Using 100% of the CPU is a bug, not a feature. No it isn't. That idea is borne of the narrowmindedness of people who write server-like network apps. What's true for web servers isn't true for every application. > If you can't re

Re: I just killed GIL!!!

2008-04-17 Thread Steve Holden
sturlamolden wrote: > Hello Guys... > > I just had one moment of exceptional clarity, during which realized > how I could get the GIL out of my way... It's so simple, I cannot help > wondering why nobody has thought of it before. Duh! Now I am going to > sit and and marvel at my creation for a whi

Re: I just killed GIL!!!

2008-04-17 Thread Jonathan Gardner
On Apr 16, 5:37 pm, sturlamolden <[EMAIL PROTECTED]> wrote: > One single process of CPython is using all the cpu power > of my dual-core laptop. Are they stuck in a while loop, waiting for their resource to become available? Using 100% of the CPU is a bug, not a feature. If you can't rewrite your

Re: I just killed GIL!!!

2008-04-17 Thread Matias Surdi
It's april 1st again??? sturlamolden escribió: > Hello Guys... > > I just had one moment of exceptional clarity, during which realized > how I could get the GIL out of my way... It's so simple, I cannot help > wondering why nobody has thought of it before. Duh! Now I am going to > sit and and ma

Re: I just killed GIL!!!

2008-04-16 Thread Torsten Bronger
Hallöchen! Tim Daneliuk writes: > Daniel Fetchinson wrote: > >> [...] >> >>> I just had one moment of exceptional clarity, during which >>> realized how I could get the GIL out of my way... It's so >>> simple, I cannot help wondering why nobody has thought of it >>> before. [...] >> >> If I were

Re: I just killed GIL!!!

2008-04-16 Thread Tim Daneliuk
Daniel Fetchinson wrote: >> Hello Guys... >> >> I just had one moment of exceptional clarity, during which realized >> how I could get the GIL out of my way... It's so simple, I cannot help >> wondering why nobody has thought of it before. Duh! Now I am going to >> sit and and marvel at my creation

Re: I just killed GIL!!!

2008-04-16 Thread Daniel Fetchinson
> Hello Guys... > > I just had one moment of exceptional clarity, during which realized > how I could get the GIL out of my way... It's so simple, I cannot help > wondering why nobody has thought of it before. Duh! Now I am going to > sit and and marvel at my creation for a while, and then go to be

I just killed GIL!!!

2008-04-16 Thread sturlamolden
Hello Guys... I just had one moment of exceptional clarity, during which realized how I could get the GIL out of my way... It's so simple, I cannot help wondering why nobody has thought of it before. Duh! Now I am going to sit and and marvel at my creation for a while, and then go to bed (it's pas