in reply to Re^8: Multithreading, how to?
in thread Multithreading, how to?

Can you explain this part of your code? ...
$Qwork->( @generation, (undef) x $noOfCores );
Is a method name supposed to have followed the "->" ??
--
Tommy

Replies are listed 'Best First'.
Re^10: Multithreading, how to?
by BrowserUk (Patriarch) on Jan 03, 2009 at 21:51 UTC
Re^10: Multithreading, how to?
by shmem (Chancellor) on Jan 03, 2009 at 21:32 UTC

    No. The notation $variable->(@args) means de-referencing, i.e. invocation of a subroutine reference (or "anonymous subroutine").

    Method invocation for $object is generally written as $object->method(@args) (unless the content of the scalar $object is a subroutine reference, which is rarely used).

    So I guess, BrowserUk really meant

    $Qwork->enqueue( @generation, (undef) x $noOfCores );

    or such, but that's just guessing.