Changing threading semantics from init early to init before
second thread
Alexander Larsson
alexl at redhat.com
Thu Aug 24 08:09:47 PDT 2006
On Thu, 2006-08-24 at 10:27 +0200, Alexander Larsson wrote:
> On Mon, 2006-08-21 at 18:33 -0400, Havoc Pennington wrote:
> > Tor Lillqvist wrote:
> > > But on the other hand it's (to the best of my knowledge) robust,
> > > tested, existing code.
> > >
> > > OK, if the threading needs of dbus are *really* trivial (just starting
> > > a thread?), maybe it's overkill, and just using the Microsoft C
> > > library's _beginthreadex() is enough.
> > >
> >
> > Doesn't even start threads - all we need is locks and cond variables.
>
> As a matter of fact, all the internal API is in dbus already, in the
> dbus-threads-internal.h header. All we need is a pthreads and a win32
> implementation of those calls. Shouldn't be a lot of work.
Here is an implementation i hacked up based lightly on the win32 glib
thread implementation. Its lightly tested, just passed make check on
unix/win32.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl at redhat.com alla at lysator.liu.se
He's a globe-trotting arachnophobic cyborg for the 21st century. She's a blind
motormouth research scientist with a song in her heart and a spring in her
step. They fight crime!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbus-threads-2.patch
Type: text/x-patch
Size: 23198 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20060824/6e9c0993/dbus-threads-2-0001.bin
More information about the dbus
mailing list