chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Thread safe hash tables?


From: Kon Lovett
Subject: Re: [Chicken-users] Thread safe hash tables?
Date: Sat, 4 Mar 2006 11:27:43 -0800

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
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users





reply via email to

[Prev in Thread] Current Thread [Next in Thread]