Describe the bug
When using parallelisation, the main process will also create thread files for each thread, but these won't be deleted in the epilog, and are obsolete anyway, because only the sub-processes need to create thread files, which are monitored by the main process if they exist.
This monitoring is done in the epilog, but the parameter for the sleep command is only set to 1, which is one millisecond. It should be 1000 for one second. This causes the while loop to end much too early, and the main process to end before the sub-processes.
### Wait for all parallel threads to finish if using pFilterParallel
If( pFilterParallel @<> '' );
sThreadFilePattern = GetProcessName() | '_ThreadControlFile_' | cRandomInt | '_' | '*.txt';
LogOutput( 'INFO', 'Checking for: ' | sThreadFilePattern );
i = 1;
While( i < pMaxWaitSeconds );
sThreadCheck = WildcardFileSearch( cDir | sThreadFilePattern, '' );
If( sThreadCheck @<> '' );
**Sleep( 1 );**
Else;
Break;
EndIf;
i = i + 1;
End;
EndIf;
Describe the bug When using parallelisation, the main process will also create thread files for each thread, but these won't be deleted in the epilog, and are obsolete anyway, because only the sub-processes need to create thread files, which are monitored by the main process if they exist.
This monitoring is done in the epilog, but the parameter for the sleep command is only set to 1, which is one millisecond. It should be 1000 for one second. This causes the while loop to end much too early, and the main process to end before the sub-processes.