Re: Threads vs. continuations

2008-02-19 Thread Paul Rubin
John Nagle <[EMAIL PROTECTED]> writes: > People did things like that to hammer threading onto operating > systems so dumb they couldn't context switch, like > DOS, early Windows, and MacOS through 7. Nobody does that > any more. I see stuff heading more the other way; here's a description of

Re: Threads vs. continuations

2008-02-19 Thread John Nagle
Tim Daneliuk wrote: > Martin v. Löwis wrote: > Is/Was it not the case, though, that some languages present > a threading model to the programmer that is realized in user > space, but not in the kernel. ISTR some early implementations > of Posix Threads that worked that way. The API was there > a

Re: Threads vs. continuations

2008-02-19 Thread Martin v. Löwis
> That's assuming that the threading implemented at the language > level is actually realized by underlying kernel threading. > Is/Was it not the case, though, that some languages present > a threading model to the programmer that is realized in user > space, but not in the kernel. You were asking

Re: Threads vs. continuations

2008-02-19 Thread Paul Rubin
Tim Daneliuk <[EMAIL PROTECTED]> writes: > 'Not trying to start a fight here, I'm just curious about the > current state of that art. It is the case today that all > modern language threading is realized over a kernel implementation > of threading that behaves as you suggest? Certainly not. See

Re: Threads vs. continuations

2008-02-19 Thread Tim Daneliuk
Martin v. Löwis wrote: >> I've been doing some thinking, and I've halfway convinced myself of >> the following statement: that threads as implemented by Python (or >> Java) are exactly equivalent to one-shot continuations in Scheme. Am >> I right? > > No. In case of threads, progress can be made

Re: Threads vs. continuations

2008-02-19 Thread Martin v. Löwis
> I've been doing some thinking, and I've halfway convinced myself of > the following statement: that threads as implemented by Python (or > Java) are exactly equivalent to one-shot continuations in Scheme. Am > I right? No. In case of threads, progress can be made in an overlapping (concurrent),

Re: Threads vs. continuations

2008-02-19 Thread Arnaud Delobelle
On Feb 19, 8:26 pm, [EMAIL PROTECTED] wrote: [...] > The only thing preventing Python from being > that language is the difficulty of integrating a macro system, n'est- > ce pas? Well there's logix (http://www.livelogix.net/logix/) -- Arnaud -- http://mail.python.org/mailman/listinfo/python-li

Re: Threads vs. continuations

2008-02-19 Thread Aahz
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: > >If that's the case, it seems threads plus hygeinic macros and a few >primitives a la Scheme would form a solid basis upon which to build a >programming language. The only thing preventing Python from being >that language is the difficu

Re: Threads vs. continuations

2008-02-19 Thread Tim Daneliuk
[EMAIL PROTECTED] wrote: > I've been doing some thinking, and I've halfway convinced myself of > the following statement: that threads as implemented by Python (or > Java) are exactly equivalent to one-shot continuations in Scheme. Am > I right? (I'd have asked in the scheme groups, but I feel li