Make some changes to the way that GMainContext works:
authorOwen Taylor <otaylor@redhat.com>
Sat, 30 Jun 2001 19:56:47 +0000 (19:56 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Sat, 30 Jun 2001 19:56:47 +0000 (19:56 +0000)
commit8951f96c50fda95a8cfaf48e8e378136a9268365
tree7f76c1d829e8c7dfe8027c0c1a7c30200079e15d
parentc88e252950fb8fcc9d91204a1527bb7a7f4dc760
Make some changes to the way that GMainContext works:

Sat Jun 30 15:49:10 2001  Owen Taylor  <otaylor@redhat.com>

* glib/gmain.[ch]: (Mostly patch from Sebastian Wilhemi)
Make some changes to the way that GMainContext works:

 - a GMainContext is no longer associated with a single
   thread, but any thread can acquire ownership
   of thread and iterate.

 - There is a facility g_main_context_wait() for
   non-owner-threads to wait either for ownership
   or for a condition to be broadcast.

 - For efficiency, GMainLoop just piggybacks of
   of the loops mutex / condition instead of
   having a separate mutex/condition for each
   GMainLoop.

* glib/gthread.[ch]: Remove hacks to store the thread's
GMainContext in the GThread structures, since we
no longer have the GMainContext <=> GThread correspondence.

        * glib/gmain.[ch]: Make g_main_context_wakeup() public
so someone could completely duplicate GMainLoop
with the public API.

* tests/mainloop-test: Fix up to the new API. Decidedly
doesn't work at the moment, but that may be the IO
channel changes, or preexisting locking problems.
12 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gmain.c
glib/gmain.h
glib/gthread.c
tests/mainloop-test.c