Re: Glib threads in gtk-perl?



On Tue, Mar 14, 2017 at 4:24 AM, Mike Martin <mike redtux org uk> wrote:
Hi
It was suggested that I look into using glib threads after posting the
problem below to gtk-list

I keep getting method not found when I try to create threads using
Glib::ThreadPool->new or
Glib::Thread->new

Are g_threads not implemented?

Alternately any other ideas on the issue

GThreads are used in Perl Glib, but only to manage Glib data
structures, not to manage threads themselves; threads should be
created/managed using the Perl 'threads' module [1][2].

You should also run 'perl -V | grep ithreads' to check to see if your
Perl is compiled with thread support, the output of the above command
should say 'useithreads=define'.

There's also a FAQ question about using threads in Gtk-Perl at [3].

Thanks,

Brian

[1] http://perldoc.perl.org/perlthrtut.html
[2] https://metacpan.org/pod/threads
[3] https://wiki.gnome.org/Projects/GTK-Perl/FrequentlyAskedQuestions#Can_I_use_threads_with_Gtk2-Perl.3F


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]