[plt-scheme] threads and mzscheme
Matthew Flatt schreef:
>
>You're right --- it won't work. MzScheme semaphores work only with the
>MzScheme thread scheduler.
>
>You'll need to use whatever synchronization primitives the C thread
>system provides, and then connect to the MzScheme scheduler through
>scheme_block_until() or scheme_add_evt().
>
>Matthew
>
>
>
Will this cause problems?
/"C functions that can invoke MzScheme (and also be invoked by MzScheme)
depend on strict function-call nesting./ For example, suppose a function
F uses an internal stack, pushing items on to the stack on entry and
popping the same items on exit. Suppose also that F invokes MzScheme to
evaluate an expression. If the evaluate on this expression invoked F
again in a new thread, but then returns to the first thread before
completing the second F, then F's internal stack will be corrupted."
Hans
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20050523/cda0995c/attachment.html>