[perl-Glib] Add some docs for the previous change
- From: Torsten SchÃnfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Glib] Add some docs for the previous change
- Date: Sun, 19 Feb 2012 15:49:45 +0000 (UTC)
commit 432e22a21d99d708ac7bd4b8a7a2a34f84090da1
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date: Sun Feb 19 16:49:30 2012 +0100
Add some docs for the previous change
Also, fix a typo in NEWS.
GSignal.xs | 34 +++++++++++++++++++++++++++++++++-
NEWS | 2 +-
2 files changed, 34 insertions(+), 2 deletions(-)
---
diff --git a/GSignal.xs b/GSignal.xs
index ee7e7b9..c9f501b 100644
--- a/GSignal.xs
+++ b/GSignal.xs
@@ -505,7 +505,36 @@ gperl_signal_emission_hook (GSignalInvocationHint * ihint,
=cut
-MODULE = Glib::Signal PACKAGE = Glib::Object PREFIX = g_
+MODULE = Glib::Signal PACKAGE = Glib::Signal
+
+=for position DESCRIPTION
+
+=head1 DESCRIPTION
+
+This page describes some functions related to signals in Glib. Since most
+things you can do with signals are tied to L<Glib::Object> instances, the
+majority of the signal functions are documented there.
+
+=head2 Thread safety
+
+Some libraries, most notably GStreamer, sometimes invoke signal handlers from a
+foreign thread that has no Perl interpreter associated with it. When this
+happens, we have no choice but to hand the marshalling over to the main loop
+which in turn later wakes up the main thread and lets it handle the request.
+We cannot invoke the signal handler from the foreign thread since the Perl
+interpreter may not be used concurrently.
+
+The downside to this approach is that the foreign thread is blocked until the
+main thread has finished executing the signal handler. This might lead to
+deadlocks. It might help in this case to wrap the crucial parts of the signal
+handler inside a L<Glib::Idle> callback so that the signal handler can return
+directly.
+
+=cut
+
+=for see_also Glib::Object
+
+=cut
BOOT:
gperl_register_fundamental (g_signal_flags_get_type (),
@@ -515,6 +544,9 @@ BOOT:
=cut
+
+MODULE = Glib::Signal PACKAGE = Glib::Object PREFIX = g_
+
##
##/* --- typedefs --- */
##typedef struct _GSignalQuery GSignalQuery;
diff --git a/NEWS b/NEWS
index 6ee1ac5..8a06031 100644
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,7 @@ Overview of changes in Glib <next>
=================================
* Make signal marshalling more thread-safe. When a signal handler is invoked
- from a foreign thread without asoociated Perl interpreter, hand the
+ from a foreign thread without associated Perl interpreter, hand the
marshalling over to the main loop which in turn later wakes up the main
thread and lets it handle the request. Since this approach is experimental,
there is debug print for now whenever it is used:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]