renegadex has asked for the
wisdom of the Perl Monks concerning the following question:
I made a thumbnail viewer using Gtk2 and Perl but sadly its very slow because it reads all the images, shrinks them into a thumbnail size and displays them after all have been loaded. I researched about threads in perl and learned that I could use a separate thread to process the images into thumbnails. The processing of the image works ok, but the displaying of the image isn't. I noticed that if the sub routine that created the thread finishes, the thread can no longer use the widgets in the main window. The widget im using is the Iconview widget. Some of the thumbnails were showed but most were not showed. If I add sleep(2) on the sub routine that created the thread, it shows all the thumbnails.