bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] conditions variables module


From: Yoann Vandoorselaere
Subject: Re: [PATCH] conditions variables module
Date: Fri, 08 Aug 2008 10:43:49 +0200

Le vendredi 08 août 2008 à 00:37 +0200, Bruno Haible a écrit :
> > - Include a new glthread module (which doesn't handle sched_yield, since
> > that might pull another dependency in. I guess we need yet another
> > separate module for this one).
> 
> It's a pity, because one cannot write a reasonable test program that works
> with GNU Pth without putting sched_yield calls here and there. But I guess
> you're right, and it needs a 5th modules, because of the extra library
> dependency.
> 
> > - Implement *basic* unit test for glthread_cond_wait() /
> > glthread_cond_timedwait().
> 
> I would prefer if you could put this into a separate test-cond.c file -
> so that test-lock.c does not need to depend on the 'cond' module.

Included in the attached patch.

> gl_thread_sigmask ?! Sounds a bit advanced. I'm not sure this can be
> implemented in a portable way, especially on Win32.

Sound like a fairly important function for application that need to
block certain signals in specific threads. I guess we can use
sigprocmask() on systems where the function is not available.


> gl_thread_atfork ?! Sounds advanced and weird to implement as well.

This one is especially important for library using threads: if an
application fork, the library won't be able to recover without this
function. 

Unfortunately, there are still systems where it is not available.

> I propose to clearly document that these two functions are not supported
> on all platforms.

I especially agree concerning pthread_atfork() (I think
pthread_sigmask() should be available on most architecture).


> Now nitpicking:

Should be fixed now.

-- 
Yoann Vandoorselaere <address@hidden>

Attachment: gnulib-threads.diff
Description: Text Data


reply via email to

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