samba-technical@lists.samba.org
[Top] [All Lists]

Re: thread pool helpers

Subject: Re: thread pool helpers
From: Volker Lendecke
Date: Fri, 1 May 2009 12:38:57 +0200
On Tue, Apr 28, 2009 at 05:47:13PM +1000, tridge@xxxxxxxxx wrote:
> I think you've created a really nice API, but the brokenness of
> pthreads make me think that we're better off implementing that API
> either on top of fork() or on top of a raw clone() call.

I've pushed it now as is.

There might be pthreads implementations around that are not
as broken. Maybe the FreeBSD one that Isilon is based upon
is better in that respect, but Tim and Steven should comment
here.

You can disable it and replace it with a sync replacement.

I've looked at a clone based implementation of
fncall_send/recv that coordinates via pipes. My main problem
here is to find a way to implement memory barriers to make
sure we see all helper threads' memory contents correctly.
Do the pipe syscalls guarantee such a memory barrier?

Volker
<Prev in Thread] Current Thread [Next in Thread>