[plt-scheme] Thread synchronization for dummies
>
> (define-syntax define-synchronized
> (syntax-rules ()
> [(_ (name args ...) body ...)
> (define name
> (let ((m (make-semaphore 1)))
> (λ(args ...)
> (semaphore-wait m)
> body ...
> (semaphore-post m))))]))
That's indeed exactly what I was looking for! Looking at it, it seems
easy, but it'd probably taken me days to write this on my own. (I
currently only have some limited spare for doing programming.)
Thanks a lot to both of you!
Best,
Erich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090528/89738460/attachment.html>