synctest
packagestandard libraryThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package synctest provides support for testing concurrent code.
See the testing/synctest package for function documentation.
Index¶
Constants¶
const (Unbubbled =Association(iota)// not associated with any bubbleCurrentBubble// associated with the current bubbleOtherBubble// associated with a different bubble)
Variables¶
This section is empty.
Functions¶
funcDisassociate¶added ingo1.25.0
func Disassociate[Tany](p *T)
Disassociate disassociates p from any bubble.
funcIsAssociated¶added ingo1.25.0
IsAssociated reports whether p is associated with the current bubble.
funcIsInBubble¶added ingo1.25.0
func IsInBubble()bool
IsInBubble reports whether the current goroutine is in a bubble.
Types¶
typeAssociation¶added ingo1.25.0
type Associationint
Association is the state of a pointer's bubble association.
funcAssociate¶added ingo1.25.0
func Associate[Tany](p *T)Association
Associate attempts to associate p with the current bubble.It returns the new association status of p.
typeBubble¶
type Bubble struct {// contains filtered or unexported fields}A Bubble is a synctest bubble.
Not a public API. Used by syscall/js to propagate bubble membership through syscalls.
funcAcquire¶
func Acquire() *Bubble
Acquire returns a reference to the current goroutine's bubble.The bubble will not become idle until Release is called.