Skip to content

Commit

Permalink
syncutil: imp docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizzick committed Dec 1, 2023
1 parent 9fba2b5 commit bfb2120
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion syncutil/sema.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ func (EmptySemaphore) Acquire(_ context.Context) (err error) { return nil }
// Release implements the [Semaphore] interface for EmptySemaphore.
func (EmptySemaphore) Release() {}

// unit is an alias for struct{} to type less.
// unit is a convenient alias for struct{}.
type unit = struct{}

// ChanSemaphore is a channel-based semaphore.
//
// It must be initialized with [NewChanSemaphore].
type ChanSemaphore struct {
c chan unit
}
Expand Down

0 comments on commit bfb2120

Please sign in to comment.