[Top][All Lists]

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

[bug #24867] `define' should be thread-safe

From: Ludovic Courtès
Subject: [bug #24867] `define' should be thread-safe
Date: Tue, 23 Dec 2008 15:21:24 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/2008121109 IceCat/3.0.4-g1

Follow-up Comment #4, bug #24867 (project guile):

Thanks for the patch and test case!

A few remarks:

  1. `scm_sym2var ()' must be changed to acquire the mutex before performing
actual lookup.  Thus, `scm_define ()' itself doesn't need to acquire it.  I
think this should be enough to fix the bug.  It shouldn't slow things down too
much, thanks to memoization.

  2. The mutex can be declared as `static'.

  3. In 1.9, we should perhaps avoid `scm_i_define_mutex' and use a
per-module mutex (which isn't possible in 1.8 since it would break ABI). 
OTOH, is it really necessary to have such a fine grain?

Can you provide an updated patch with ChangeLog-style entry?



Reply to this item at:


  Message sent via/by Savannah

reply via email to

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