|
Hello i am writing a perl program. I would like to use threads in my application. I would like to open diectories and displays its files. Is this thread safe?
sub getDirSize {
opendir(DIRECTORY,$path) or die "error";
.....
closedir(DIRECTORY);
}
supose i will invoke this sub like this:
$T1 = new Thread \&getDirSize;
$T2 = new Thread \&getDirSize;
...
$T1->join;
$T2->join;
is this thread safe?
Thanks in advance,
Hernan Danielan.
|
|
|
|
|
|
|
|