Mar 4, 2009, 10:34 AM
Post #1 of 4
I'm having some problems with race conditions in my program, as warn and print are not guaranteed to print in the order they are called.
"Warn" prints faster than "print"? Race conditions question
For example, consider the part of my program shown below
if(do pattern matching stuff)
print "Now looking at document titled $1)
if(do more pattern matching stuff)
warn "This document contains terrible, terrible things\n";
The output is always:
This document contains terrible, terrible things
Now looking at document titled Bob
This is really annoying. Does anybody have any suggestions to force the warn and print to finish in the correct order?