I'm running a script, and in the middle of script execution I want to capture system performance data print it and then continue with the script execution.
Obj->GetSystemInfo($s,$name,$App)
Inside this function, I have separate subroutines to handle each kind of information such as RAM, Heapinfo etc., I want each subroutine to run on a separate thread and retrieve the necessary information. How can I make this happen ?
If I do it this way, only the cputhread output gets printed on the console.
$RAMthread = threads->new(sub{$self->GetFreeRAM($serial)});
$heapthread = threads->new(sub{$self->Getheap($serial)});
$cputhread = threads->new(sub{$self->Getcpu($serial)});
Thank you,
Perllace