[r6rs-discuss] [Formal] SRFI-39 should be made an R6RS library
bear
bear at sonic.net
Mon Feb 12 18:10:43 EST 2007
On Mon, 12 Feb 2007, Michael Sperber wrote:
>
>bear <bear at sonic.net> writes:
>
>> On Sat, 10 Feb 2007, Michael Sperber wrote:
>>
>>> Anyway, the behavior of Chez's thread parameters isn't covered by what
>>> I meant as "hideous". However, even Chez's thread parameters (which
>>> behave the same as PLT Scheme's parameters, I believe) are problematic
>>> when threads and continuations interact. Things are simpler when
>>> dynamic binding and (possibly thread-local) mutation are separate
>>> mechanisms.
>>
>> I think that the interaction of threads and continuations is *Necessarily*
>> hideous, especially in the presence of mutation.
>
>No. In the absence of mutation, it's unproblematic.
dynamic-wind introduces a segment of code which must be executed whenever
entering or leaving a continuation. Threads mean that a particular
continuation may be entered and/or left simultaneously by different
threads. If you cannot guarantee that the continuation was created
by the same thread that's entering/leaving it, you cannot make an
effective semaphore on the winding code without using a (mutable)
variable that must be in shared memory. Hence, necessary hideousness;
you cannot have both threads and continuations in the absence of
mutation.
Bear
More information about the r6rs-discuss
mailing list