Changing threading semantics from init early to init before
second thread
Havoc Pennington
hp at redhat.com
Mon Aug 21 10:36:50 PDT 2006
Robert McQueen wrote:
> This seems very appealing to me - pthreads are supposed to be the
> standard thread mechanism which everyone codes to. I even recall that
> win32 has a pthreads implementation floating around somewhere. If it's
> sufficient to allow D-Bus to do what it needs even when running in
> threads which weren't created under this abstraction, it would be
> possible for us to just require pthreads and leave it at that.
>
It'd probably be better to abstract the windows native threads instead
of requiring cygwin or something. It shouldn't be a lot of work.
A simple way to do this is just create dbus-sysdeps-threads.c that can
return the "thread funcs" struct for the current platform; then we can
just init threads with these thread funcs if the app doesn't init
threads, will take some thinking about when exactly to do the init.
Havoc
More information about the dbus
mailing list