
run414
New User
Mar 4, 2009, 10:34 AM
Post #1 of 4
(345 views)
|
|
"Warn" prints faster than "print"? Race conditions question
|
Can't Post
|
|
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. 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?
|