[Top][All Lists]

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

Re: Code review for thread safeness

From: Marius Vollmer
Subject: Re: Code review for thread safeness
Date: Tue, 08 Mar 2005 02:18:51 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Kevin Ryde <address@hidden> writes:

> Marius Vollmer <address@hidden> writes:
>> If there might be non-local exits, scm_frame_critical_section can be
>> used instead.
> If an error occurs and a lazy-catch executes, is the mutex unlocked
> for that handler?

No.  Good point.  Hmm.  I haven't thought about lazy catches at all,
yet...  They are like asyncs but can not be blocked.  But, they are
not as much uncontrolled as asyncs.

The important point here is that a critical section is not reentered
when it is not designed to allow this.  When a lazy handler tries to
reenter it, an error is signalled when scm_frame_critical_section is
used with a non-recursive mutex.  I think this is appropriate.

> The ones I've spotted are (I might have posted this before),
>       gethostbyname
>         getpwuid
>       setpwent (etc)
>       getgrgid
>       setgrent (etc)
>       setlocale
>       scm_mem2symbol 
> or scm_i_mem2symbol or whatever it is now.  I probably won't get a
> chance to actually do anything about these.

Thanks, I'll check them.

GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405

reply via email to

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