Thanks for pointing for the error. I fixed the issue by putting below fix
if ( $totalKeys < $numThreads ) { $numThreads = $totalKeys; }
Now this code is running as expected.
In reply to Re^4: How to make a thread to wait till a command on shell get completed.
by techman2006
in thread How to make a thread to wait till a command on shell get completed.
by techman2006
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |