package synctest

Import Path
	internal/synctest (on go.dev)

Dependency Relation
	imports 2 packages, and imported by 2 packages

Involved Source Files Package synctest provides support for testing concurrent code. See the testing/synctest package for function documentation.
Package-Level Type Names (total 2)
/* sort by: | */
Association is the state of a pointer's bubble association. func Associate[T](p *T) Association const CurrentBubble const OtherBubble const Unbubbled
A Bubble is a synctest bubble. Not a public API. Used by syscall/js to propagate bubble membership through syscalls. Release releases the reference to the bubble, allowing it to become idle again. Run executes f in the bubble. The current goroutine must not be part of a bubble. func Acquire() *Bubble
Package-Level Functions (total 7)
Acquire returns a reference to the current goroutine's bubble. The bubble will not become idle until Release is called.
Type Parameters: T: any Associate attempts to associate p with the current bubble. It returns the new association status of p.
Type Parameters: T: any Disassociate disassociates p from any bubble.
Type Parameters: T: any IsAssociated reports whether p is associated with the current bubble.
IsInBubble reports whether the current goroutine is in a bubble.
func Run(f func())
func Wait()
Package-Level Constants (total 3)
const CurrentBubble Association = 1 // associated with the current bubble
const OtherBubble Association = 2 // associated with a different bubble
const Unbubbled Association = 0 // not associated with any bubble