github.com/go-eden/common@v0.1.15-0.20210617133546-059099253264/esync/README.md (about)

     1  # esync
     2  
     3  # `ReMutex`
     4  
     5  An implementation of `reentrant lock`, based on `sync.Mutex`:
     6  
     7  demo1:
     8  
     9  ```go
    10  var m ReMutex
    11  
    12  m.Lock()
    13  m.Lock()
    14  m.Unlock()
    15  m.Unlock()
    16  ```
    17  
    18  more demo in [`sync_remutex_test.go`](./sync_remutex_test.go)