summaryrefslogtreecommitdiff
path: root/src/mongo/gotools/vendor/src/github.com/jtolds/gls/gen_sym.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/gotools/vendor/src/github.com/jtolds/gls/gen_sym.go')
-rw-r--r--src/mongo/gotools/vendor/src/github.com/jtolds/gls/gen_sym.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mongo/gotools/vendor/src/github.com/jtolds/gls/gen_sym.go b/src/mongo/gotools/vendor/src/github.com/jtolds/gls/gen_sym.go
new file mode 100644
index 00000000000..8d5fc24d4a4
--- /dev/null
+++ b/src/mongo/gotools/vendor/src/github.com/jtolds/gls/gen_sym.go
@@ -0,0 +1,13 @@
+package gls
+
+var (
+ symPool = &idPool{}
+)
+
+// ContextKey is a throwaway value you can use as a key to a ContextManager
+type ContextKey struct{ id uint }
+
+// GenSym will return a brand new, never-before-used ContextKey
+func GenSym() ContextKey {
+ return ContextKey{id: symPool.Acquire()}
+}