Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
Group manages concurrency groups with semaphores
type Semaphore ¶
type Semaphore struct {
// contains filtered or unexported fields
}
Semaphore is a counting semaphore for limiting concurrency
func NewSemaphore ¶
NewSemaphore creates a new semaphore with the given capacity
func (*Semaphore) Acquire ¶
Acquire acquires a slot, blocking until one is available or context is cancelled
func (*Semaphore) TryAcquire ¶
TryAcquire attempts to acquire a slot without blocking Returns true if acquired, false otherwise
Click to show internal directories.
Click to hide internal directories.