summaryrefslogtreecommitdiff
path: root/thr.pl
diff options
context:
space:
mode:
Diffstat (limited to 'thr.pl')
-rw-r--r--thr.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/thr.pl b/thr.pl
index 4831f29..a2e1386 100644
--- a/thr.pl
+++ b/thr.pl
@@ -3,7 +3,8 @@ use strict;
use warnings;
use threads;
use Glib;
-use Queue;
+use Thread::Queue::Event;
+use Thread::Queue::Event::Glib;
=head1 Signaling across threads to a Glib loop
@@ -11,8 +12,8 @@ Looks like the best way is to use a pipe
=cut
-my $q=Glib::Thread::Queue->new();
-my $q2=Glib::Thread::Queue->new();
+my $q=Thread::Queue::Event->new()->with_role('Glib');
+my $q2=Thread::Queue::Event->new();
threads->create(
sub{