in reply to How to create separate threads for concurrent execution?
Update: Hm. Old, tired eyes. What did I think I read.
Forget this bollocks and I'll try again:
It is bound to require more detail than this, but on the basis of the scant information in your post, this could be all you need:
use threads; ... async{ $RAMthread = threads->new(sub{$self->GetFreeRAM($serial)}); $heapthread = threads->new(sub{$self->Getheap($serial)}); $cputhread = threads->new(sub{$self->Getcpu($serial)}); ## Presumably you do something with teh above agathered informatio +n... ... # do it here }->detach; ## get on with other stuff ...
|
|---|