Semaphore.Constructor(NumResources as Integer)

From Xojo Documentation

Constructor
Semaphore.Constructor([numResources as Integer]=1)

The Semaphore has a constructor that takes the initial count of the number of resources the semaphore is protecting as an optional parameter. This defaults to 1. If you need to manage access to a single resource, you can instead use a CriticalSection.