bug-gnulib
[Top][All Lists]
Advanced

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

Re: [Bug-gnulib] Re: requirements of 'unlocked-io' module


From: Paul Eggert
Subject: Re: [Bug-gnulib] Re: requirements of 'unlocked-io' module
Date: 23 Nov 2003 22:42:47 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Bruno Haible <address@hidden> writes:

> The vast majority of GNU packages so far is single-threaded. We make things
> easy for the majority; it's not a useful policy (in the sense of "worse is
> better") to make things complicated for the majority just to serve a minority
> and a theoretical argument.

Conversely, one could argue that gnulib should default to safe mode,
and should use unlocked-IO only when the user says "Yes, I know that
my code is single-threaded".

Ideally gnulib would do this automatically: it would detect that the
app is multithreaded and would disable unlocked-IO.  If a package had
some multithreaded apps and some unithreaded apps, that would work too.
I don't know how to do that easily, though.

Perhaps the simplest fix for now is to add a new macro
gl_FUNC_GLIBC_UNLOCKED_IO that defaults to not using unlocked io, but
uses unlocked io if it is given an argument of 1.  The existing
jm_FUNC_GLIBC_UNLOCKED_IO would be equivalent to
gl_FUNC_GLIBC_UNLOCKED_IO(1).  This would be a signal to the user that
one has to decide whether any app might be multithreaded.




reply via email to

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