On Mar 2, 2006, at 4:37 AM, Thomas Chust wrote:
Hello,
just a small question: Are CHICKEN's hash tables threadsafe by
design or do I have to surround all hash table accesses in
multithreaded applications by a mutex-lock! / mutex-unlock! pair?
FWIW my reading of the source is 1) No & 2) Yes. You could surround
access w/ disable/enable interrupts, since that would inhibit a
context switch by the schedular during the access. But I think
creating a "thread-safe" wrapper around your shared data-structure,
as you suggest, is the best.
cu,
Thomas
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users