Re: Threads and Gtk2
- From: Javier Godinez <godinezj gmail com>
- To: ofey aikon <ofey aikon gmail com>
- Cc: GTK2-Perl List <gtk-perl-list gnome org>
- Subject: Re: Threads and Gtk2
- Date: Thu, 20 Oct 2005 12:55:39 -0700
Thanks ofey, it works now, I really appreciate your help...
I don't think this is releated but has anybody seen an error like this:
*** glibc detected *** free(): invalid pointer: 0x086a69c8 ***
It occours when I call Gtk2->main_quit;
(Not in this example, but the application I am writing)
Any ideas?
Javier Godinez
On 10/19/05, ofey aikon <ofey aikon gmail com> wrote:
#!/usr/bin/perl -w
use Gtk2 '-init';
use strict;
use threads;
use threads::shared;
my $keep_running : shared = 1;
my $thr1 = threads->new(
sub {
while ($keep_running == 1 ) {
print "Hello\n";
sleep(1);
}
});
sub button_callback {
$keep_running = 0;
$thr1->join;
Gtk2->main_quit;
}
my $window = Gtk2::Window->new;
my $button = Gtk2::Button->new ("Quit!");
$button->signal_connect (clicked => \&button_callback);
$window->add($button);
$window-> show_all;
Gtk2->main;
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]