package synctest
import "internal/synctest"
Package synctest provides support for testing concurrent code.
See the testing/synctest package for function documentation.
Index ¶
Functions ¶
func Run ¶
func Run(f func())
func Wait ¶
func Wait()
Types ¶
type Bubble ¶
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.
func Acquire ¶
func Acquire() *Bubble
Acquire returns a reference to the current goroutine's bubble. The bubble will not become idle until Release is called.
func (*Bubble) Release ¶
func (b *Bubble) Release()
Release releases the reference to the bubble, allowing it to become idle again.
func (*Bubble) Run ¶
func (b *Bubble) Run(f func())
Run executes f in the bubble. The current goroutine must not be part of a bubble.
Source Files ¶
- Version
- v1.24.0
- Published
- Feb 10, 2025
- Platform
- windows/amd64
- Imports
- 1 packages
- Last checked
- 36 seconds ago –
Tools for package owners.