in reply to synchronized sub-routine call
I don't think most of us (davido aside), have really attempted to answer the question you asked. In part that is because of the way you asked the question.
In your example, the wait calls will not be reached until the preceding subroutine call has completed, by which time the wait is doing nothing useful. Leastwise, that is the case in a synchronous environment.
Since alarm has never been implemented on Win32, that isn't going to solve your problem.
The solution is to use threads.
use threads 'async'; sub A{ ... } sub B{ ... } sub C{ ... } async \&A; Win32::Sleep( millis ); async \&B; Win32::Sleep( millis ); async \&C; Win32::Sleep( millis );
That's almost certainly not the complete solution, but the rest depends upon what your trying to achieve.
|
|---|