[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using define in multiple threads?
From: |
Andy Wingo |
Subject: |
Re: Using define in multiple threads? |
Date: |
Mon, 17 Nov 2008 21:45:44 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Hello!
On Mon 17 Nov 2008 15:57, address@hidden (Ludovic Courtès) writes:
> Han-Wen Nienhuys <address@hidden> writes:
>
>> Linas Vepstas escreveu:
>>> Is it "safe" or "legal" to use define in multiple threads?
>
> Besides, as Linas noted, the hash table implementation isn't
> thread-safe, which makes it "unsafe" to `define' in parallel.
Ah, this is why, then. I was baffled.
IMO this is a bug; Guile can claim that "wierd behavior is expected"
when using a data structure from multiple threads in without locking,
but in this case the data structure is only being used implicitly.
Modules should contain a lock that is taken when they are mutated.
This isn't the first time I've wanted a functional hash table
implementation...
Andy
--
http://wingolog.org/