mirror of
https://github.com/kopia/kopia.git
synced 2026-02-18 15:05:46 -05:00
13 lines
145 B
Go
13 lines
145 B
Go
package object
|
|
|
|
type empty struct{}
|
|
type semaphore chan empty
|
|
|
|
func (s semaphore) Lock() {
|
|
s <- empty{}
|
|
}
|
|
|
|
func (s semaphore) Unlock() {
|
|
<-s
|
|
}
|