Skip to content

Commit d98c691

Browse files
committed
Sort out async writing
1 parent d9afa82 commit d98c691

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

run.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,17 @@ function spawnTest(){
653653

654654
new Parallel(envelope[i]).spawn(webworkerResults).then(result=>{
655655

656-
console.log(result.output);
656+
657+
658+
var printError = false;
659+
do{
660+
try{
661+
console.log(result.output);
662+
} catch(e){
663+
printError = true;
664+
}
665+
} while(printError) // as we are logging async we risk to try to write to a locked file.
666+
657667
score.ok.total += result.score.ok.total;
658668
score.fail.total += result.score.fail.total;
659669
score.skip.total += result.score.skip.total;

0 commit comments

Comments
 (0)