Your code is safe for multiple threads to post to the queue. But you also must make sure, that Processing a messsage from queue, would not break Posting safetiness. The easiest way, is to wrap message extraction into the same fpgApplication.Lock
You must also make sure, that no thread can try to post message, after fpgApplicaiton is released. And it's quite possible situation, that causes "strange errors" on application finalization.
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal