Threads, thread unsafe modules, and an alternative

E. Choroba — 20 minutes 🐪

Using the PerlMonks Chatter Box GUI Client as an example, we'll see how to integrate Tk safely into a threaded program via Thread::Queue, or via MCE to avoid threads

PM::CB::G or Perl Monks Chatter Box GUI Client is a Tk program that uses threads to keep the GUI responsive even when communicating over the net. Threads are, by the official documentation, discouraged - but if one knows how to use them safely, they can help you. MCE::Shared has the API very similar to Thread::Queue so you can easily switch between the two.



Talk tags
threads, gui, perlmonks, mce
Perl versions
🐪 Perl 5
Target audience
Intermediate
Category
Perl 5 programming
Talk duration
20 minutes
Talk status
accepted
Related links

http://choroba.matfyz.cz/19-pmcbg

https://github.com/choroba/pm-cb/

Talk announce