chainlock

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

package chainlock implements a mutex whose Lock and Unlock methods return the lock itself, to enable chaining.

Intended Usage

  defer s.lock().unlock()
  // drop lock while waiting for wait group
  func() {
	     defer a.l.Unlock().Lock()
	     fssesDone.Wait()
	 }()

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type L

type L struct {
	// contains filtered or unexported fields
}

func New

func New() *L

func (*L) DropWhile

func (l *L) DropWhile(f func())

func (*L) Lock

func (l *L) Lock() *L

func (*L) NewCond

func (l *L) NewCond() *sync.Cond

func (*L) Unlock

func (l *L) Unlock() *L

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL