in reply to Re: Ways to sequence calls from multiple processes in thread Ways to sequence calls from multiple processes
although, it may actually be better to not explicitly unlock in this case. For example, if someone else is waiting for the lock on FH, they might conceivably get the lock after the LOCK_UN step, but before the close(FH) AND therefore before the first process has flushed it's write operations to disk. alternatives are using autoflushing ($| = 1) or using the FileHandle->autoflush() method.
|