Re: thread safe?
[email protected] Thu, 11 Dec 2003 11:29:30 -0800 (PST)
| Newsgroups | gmane.lisp.scheme.ssax-sxml |
|---|---|
| Message-ID | <[email protected]> |
Hello! > I'm wondering if there are any obvious pitfalls -- first prototype > doesn't look good (seeds getting stomped on, etc.), One has to be careful with the input port. The port is considered as a linearly updateable datum. So, two different instances of SSAX in two different threads must have their own, separately created, input port (even both ports eventually refer to the same file). We also should make sure that just reading from ports is thread-safe. As I recall, it is safe on Gambit. Of course it depends what kind of thread system we deal with: implemented by a particular Scheme system or POSIX threads. In the latter case, we should make sure that the whole i/o library (libc) is thread-safe and the Scheme run-time is compiled with thread-safe system libraries. The seeds in SSAX are treated _explicitly_ as linear parameters -- this is as thread-safe as one can possibly get. If it is possible to provide some details (or a small representative example), it would help to analyze the problem further. Cheers, Oleg ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click