[Top][All Lists]

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

Re: crypt mutex

From: Mikael Djurfeldt
Subject: Re: crypt mutex
Date: Mon, 23 Feb 2004 14:46:50 -0500
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Marius Vollmer <address@hidden> writes:

>> In most cases, I would probably draw the line so that as much as
>> possible of the responsibility is left to the user with the
>> exceptions that 1. Guile should never segfault due to misuse in
>> this respect, and, 2. Guile need to have enough thread safety so
>> that it's reasonably convenient to write parallel programs.
> Yes, exactly my view.  Also, I would broaden point 1 a bit: we should
> also 'fix' functions that can not every be used in a threaded program
> without mutexes around them.  Like libc getpwent.  They might not
> segfault, but you can't use them anyway in a threaded program.

But the normal case is *not* a threaded program.  The everyday program
can use crypt with a static buffer without mutexes.  A *threaded*
program needs mutexes...

This is why I'm leaning towards a minimal policy---to design for the
common case of non-threaded programs, but leave the possibility open
to write parallel code without too much difficulty.


reply via email to

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