|
From: | Noah Lavine |
Subject: | Re: Thread-unsafe initialization problems in Guile |
Date: | Tue, 5 Mar 2013 15:00:46 -0500 |
Here's an article from a reputable source that backs up my claim that
the lazy-initialization pattern that we use in a few places is not
thread-safe:
http://www.ibm.com/developerworks/java/library/j-dcl/index.html
Here are the thread-unsafe lazy initializations that I'm aware of:
In each of these cases, we have two options: (1) synchronize on every
./posix.c:1375: make_rw_port = scm_c_private_variable ("ice-9 popen",
./debug.c:217: local_eval_var = scm_c_public_variable ("ice-9 local-eval", "local-eval");
./strports.c:541: eval_string = scm_c_public_lookup ("ice-9 eval-string", "eval-string");
access of the lazily-initialized variable (including reads), or (2)
abandon lazy initialization.
Thoughts?
Mark
[Prev in Thread] | Current Thread | [Next in Thread] |