redsync/example_test.go

19 lines
267 B
Go
Raw Normal View History

2022-10-25 18:33:12 +03:00
package redsync_test
2022-10-25 18:48:22 +03:00
import "git.bit5.ru/backend/redsync"
2022-10-25 18:33:12 +03:00
func ExampleMutex() {
m, err := redsync.NewMutexWithGenericPool("FlyingSquirrels", pools)
if err != nil {
panic(err)
}
err = m.Lock()
if err != nil {
panic(err)
}
defer m.Unlock()
// Output:
}