i havent been clear enough in what i want to do actually, i have a multithreding app and i want to print stuff on the screen just as they happen. i want print to be atomic so thats why i want to lock the screen before i start doing anything. id like to get the order in wich threads
In that case, I don't think you want to lock the screen but set STDOUT to be non-buffering. See the $| entry in perlvar or Suffering from Buffering.
Update: At the beginning of your script, I would set STDOUT to be non-buffering:
select STDOUT; $| = 1;
In reply to Re^3: locking STDOUT
by derby
in thread locking STDOUT
by spx2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |