Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Semaphore ¶
type Semaphore struct {
// contains filtered or unexported fields
}
Semaphore provides a reusable mechanism for controlling concurrent access to a resource.
func NewSemaphore ¶
NewSemaphore creates a new semaphore with the specified concurrency limit.
func (*Semaphore) Acquire ¶
func (s *Semaphore) Acquire()
Acquire acquires a semaphore permit. Blocks if no permits are available.
Click to show internal directories.
Click to hide internal directories.