[plt-scheme] plt-threads in r6rs

From: sballnat (stefan.ballnat at yahoo.de)
Date: Fri Oct 16 05:01:35 EDT 2009


I'm writing an r6rs-script using some functions imported from (scheme
base) and (scheme tcp). I'm especially using threads and want to make
sure everything is thread-safe as described in the manual (10.1
Threads). There it is said that most operations are atomic (like set!)
or in case of hashtables they have semaphores. Now, I wonder if this
is still true for r6rs-operations and hashtables.

 I'm running a tcp-server on scheme accepting new connections. For
every connection a thread is started who is reading from the new tcp-
port, doing some evaluation and sending the result back via the
corresponding tcp-output-port. Some intermediate-results are safed in
hashtables (with set!), which are shared between all threads.

I already had some problems while using the ssax-library I ported to
r6rs when reading some xml-files. I used semaphores at this part to
avoid the failures but I still wonder, if the rest of my script is

Thanks in advance, Stefan

Posted on the users mailing list.