Help us shape the future of Go! Take the 2026 Go Developer Survey

waitmap

package module
v0.0.0-...-920702f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2012 License: MIT Imports: 1 Imported by: 0

README

incomplete

Documentation

Overview

Package waitmap implements a simple thread-safe map.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WaitMap

type WaitMap struct {
	// contains filtered or unexported fields
}

func New

func New() *WaitMap

func NewCap

func NewCap(c int) *WaitMap

func (*WaitMap) Check

func (m *WaitMap) Check(k interface{}) bool

Returns true if k is a key in the map.

func (*WaitMap) Get

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 (*WaitMap) Set

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL