Documentation ¶ Index ¶ func WithContextCheck(ctx context.Context, action func() error) error type Semaphore func NewSemaphore(n int) *Semaphore func (s *Semaphore) Acquire() func (s *Semaphore) Release() func (s *Semaphore) TryAcquire() bool Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func WithContextCheck ¶ func WithContextCheck(ctx context.Context, action func() error) error Types ¶ type Semaphore ¶ type Semaphore struct { // contains filtered or unexported fields } func NewSemaphore ¶ func NewSemaphore(n int) *Semaphore func (*Semaphore) Acquire ¶ func (s *Semaphore) Acquire() func (*Semaphore) Release ¶ func (s *Semaphore) Release() func (*Semaphore) TryAcquire ¶ func (s *Semaphore) TryAcquire() bool Source Files ¶ View all Source files context.gosemaphore.go Click to show internal directories. Click to hide internal directories.