in reply to Re^2: create new task from main program
in thread create new task from main program
Changing
push @threads, async \&READ_FILE($file);
to
push @threads, async \&READ_FILE, $file;
should cure that problem.
Ie. You need to pass the address of the subroutine, and the parameter as separate items. What you were doing is calling the function and then passing the address of the return value to async
HTH.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: create new task from main program
by benlaw (Scribe) on Apr 12, 2006 at 17:34 UTC | |
|
Re^3: create new task from main program
by benlaw (Scribe) on Apr 13, 2006 at 06:44 UTC | |
by BrowserUk (Patriarch) on Apr 14, 2006 at 12:40 UTC |