in reply to Problem with script using threads
Hi,
This is how you do threads, you separate the main thread modules from the worker thread modules
#!/usr/bin/perl -- use strict; use warnings; use threads stack_size => 4096; use Thread::Queue; Main( @ARGV ); exit( 0 ); sub Main { my $q = Threads::Queue->new; ... } sub Worker { require Text::CSV_XS; require SOAP::Lite; require XML::Twig; require Config::IniFiles; require Tie::File; ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem with script using threads
by bsshetty17 (Acolyte) on May 11, 2017 at 08:53 UTC | |
by Anonymous Monk on May 12, 2017 at 23:44 UTC | |
by Anonymous Monk on May 13, 2017 at 10:12 UTC | |
|
Re^2: Problem with script using threads
by bsshetty17 (Acolyte) on May 10, 2017 at 05:20 UTC | |
by bsshetty17 (Acolyte) on May 10, 2017 at 08:53 UTC | |
by Anonymous Monk on May 10, 2017 at 11:05 UTC |