in reply to Re: Starting multi-threading
in thread Starting multi-threading
and this what iget back in return.AUTOLOAD; require 5.008; use strict; use warnings 'all'; use diagnostics; use Win32::OLE qw[in]; use threads; use threads::shared; use strict; my @up: shared; my @childs; my $child; my @down: shared; my @list = qw ( c:/winnt d:/perl ); for (@list){ push @childs, threads->create("process_path","$_");} for $child (@childs){ $child->join();} for my $info (@up){ print $info;}#I'll do some work here once I get results sub process_path{ my $path = shift @_; my $Details={}; my $fso = Win32::OLE->new( 'Scripting.FileSystemObject' ); my $FSize = $fso->GetFolder($path); my $Size = $FSize->size(); $Details->{path}=$path; $Details->{size} =$Size; push @up, $Details; }
I don't know what else to do to it! So, is this the end?C:\Scripts>threads1.pl Win32::OLE(0.1403) error 0x800a004c Win32::OLE(0.1403) error 0x800a004c in METHOD/PROPERTYGET "GetFolder" at C:\Scripts\threads1.pl line 3 +3 thread failed to start: Can't call method "size" on an undefined value + at C:\Scripts\threads1.pl line 34 (#1) (F) The entry point function of threads->create() failed for some +reason. in METHOD/PROPERTYGET "GetFolder" at C:\Scripts\threads1.pl line 3 +3 thread failed to start: Can't call method "size" on an undefined value + at C:\Scripts\threads1.pl line 34 (#1) (F) The entry point function of threads->create() failed for some +reason. Free to wrong pool 1a99e90 not 223f58 during global destruction.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Starting multi-threading
by BrowserUk (Patriarch) on Aug 24, 2003 at 20:19 UTC | |
by blackadder (Hermit) on Aug 24, 2003 at 20:41 UTC | |
by BrowserUk (Patriarch) on Aug 24, 2003 at 20:52 UTC | |
by liz (Monsignor) on Aug 24, 2003 at 21:21 UTC | |
by BrowserUk (Patriarch) on Aug 24, 2003 at 21:37 UTC |