diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-05 13:02:57 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-05 13:33:02 -0700 |
commit | 5a1a904b4264c6ee323c9bd433f9ee4da93c984d (patch) | |
tree | 035414c8e8f3b94e24b482e5096a3b4e3688e257 /typedsync/doc.go | |
parent | 2d939c9c6e62395ed924fe7c5cd4c4b294e391a9 (diff) |
typedsync: Bring up to being a mostly-drop-in replacement for Go 1.20 sync
Diffstat (limited to 'typedsync/doc.go')
-rw-r--r-- | typedsync/doc.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/typedsync/doc.go b/typedsync/doc.go new file mode 100644 index 0000000..e20d44c --- /dev/null +++ b/typedsync/doc.go @@ -0,0 +1,28 @@ +// Copyright (C) 2023 Luke Shumaker <lukeshu@lukeshu.com> +// +// SPDX-License-Identifier: GPL-2.0-or-later + +// Package typedsync is an alternative to the standard library's sync +// that uses type-parameters for type safety. +// +// This package does not bother to duplicate documentation from the +// standard library's sync package; see [sync's documentation] for +// full documentation. +// +// Besides requiring type parameters and such, typedsync is a drop-in +// replacement for sync. +// +// [sync's documentation]: https://pkg.go.dev/sync +package typedsync + +import ( + "sync" +) + +type ( + Locker = sync.Locker + Mutex = sync.Mutex + Once = sync.Once + RWMutex = sync.RWMutex + WaitGroup = sync.WaitGroup +) |