# 'manager' loggin thread: communication queues initialization # and thread creation # my ($mgr_id, $mgr_req_q, $mgr_ack_q); $mgr_req_q = new Thread::Queue; $mgr_ack_q = new Thread::Queue; $mgr_id = threads->create("SerialLogger::manager"); # Main window # my $w_top = MainWindow->new(-title => "COM Monitor"); ... ... # tk stuff MainLoop; # Clean up and exit (after MainLoop returned) $mgr_req_q->enqueue("die"); $mgr_id->join(); exit(0);