Xojo.Threading.Semaphore.TrySignal
From Xojo Documentation
Method
Determines whether there is a lock available. If there is a lock available, you are granted the lock and TrySignal returns True. When you are finished with the resource, call Release to give it back to the Semaphore. If the lock is not available, it does not block. Instead, TrySignal returns False to let you know. Do not attempt to use the resource after it returns False because you are likely to collide with another thread.