Discover Packages
github.com/bytbox/waitmap.go
package
module
Version:
v0.0.0-...-920702f
Opens a new window with list of versions in this module.
Published: Mar 11, 2012
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Expand ▾
Collapse ▴
Documentation
¶
Package waitmap implements a simple thread-safe map.
Returns true if k is a key in the map.
func (m *WaitMap ) Get(k interface{}) interface{}
Retrieves the value mapped to by k. If no such value is yet available, waits
until one is, and then returns that. Otherwise, it returns the value
available at the time Get is called.
func (m *WaitMap ) Set(k interface{}, v interface{}) bool
Maps the given key and value, waking any waiting calls to Get. Returns false
(and changes nothing) if the key is already in the map.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.