[Top][All Lists]

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

Re: Thread-unsafe initialization problems in Guile

From: Andy Wingo
Subject: Re: Thread-unsafe initialization problems in Guile
Date: Mon, 21 Jan 2013 21:04:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)


On Thu 29 Nov 2012 23:42, Mark H Weaver <address@hidden> writes:

> scm_local_eval (SCM exp, SCM env)
> {
>   static SCM local_eval_var = SCM_BOOL_F;
>   if (scm_is_false (local_eval_var))
>     local_eval_var = scm_c_public_variable ("ice-9 local-eval", "local-eval");
>   return scm_call_2 (SCM_VARIABLE_REF (local_eval_var), exp, env);
> }
> The problem is that it's possible for a thread to see a non-#f value for
> 'local_eval_var' before it sees the memory it points to properly
> initialized.

scm_c_public_variable is not idempotent?

If it is, where is the problem?


reply via email to

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