Skip to content

Commit

Permalink
Improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Zamony committed Feb 24, 2024
1 parent 668e9df commit 7d01830
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion sync/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Additional synchronization primitives:
* generic goroutine-safe map;
* safer waitgroup;
* singleflight (duplicate call suppression).
* singleflight (duplicate call suppression);
* context-aware mutex.

**Thread-safe map**
```
Expand Down Expand Up @@ -30,3 +31,10 @@ New() Group
Group.Do(key K, fun func() V) V
```

**Mutex**
```
TryLock(ctx context.Context) error
TryRLock(ctx context.Context) error
Lock()/Unlock()
RLock()/RUnlock()
```

0 comments on commit 7d01830

Please sign in to comment.