Acquire one unit of resource from the semaphore.
If no resource is available,
acquire will block and wait until any resource is available.
If there are multiple tasks both waiting for the same resource,
new resource will be delivered in a first-come-first-serve manner.
acquire itself never fail, and will wait indefinitely.
However, since acquire is a blocking point,
the task running acquire may be cancelled,
in this case, an cancellation will be raised from acquire.