> If one has non-deterministic interrupts, and continuations, then one has > threads. As with C's sequencing points, there are (only) specific > points in the execution of a serial segment of Scheme code where a thread > switch is permitted but that is a very fine-grained limitation. > > Threads are fine, regardless of implementation, if the effect is "as if" > we were witnessing an interrupt driven, serial execution of continuations.
That may be desirable for lightweight threads operating on a single processor, but the overhead of arranging this for a multiprocessor thread system would likely be prohibitive. > I think the big thing that is missing, to make things *not hideous*, > is (I hope I'm using the terminology correctly), delimited continuations. > In Guile Scheme (even absent true threads), I found it useful to > have a construct like: > > (call-with-one-shot-continuation (lambda (k) <body>)) These are simply "one-shot" continuations. Delimited continuations (also called partial continuations or subcontinuations) are something different. Kent _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
