Movatterモバイル変換


[0]ホーム

URL:


synctest

packagestandard library
go1.25.5Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License:BSD-3-ClauseImports:2Imported by:0

Details

Repository

cs.opensource.google/go/go

Links

Documentation

Overview

Package synctest provides support for testing concurrent code.

See the testing/synctest package for function documentation.

Index

Constants

View Source
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

funcDisassociateadded ingo1.25.0

func Disassociate[Tany](p *T)

Disassociate disassociates p from any bubble.

funcIsAssociatedadded ingo1.25.0

func IsAssociated[Tany](p *T)bool

IsAssociated reports whether p is associated with the current bubble.

funcIsInBubbleadded ingo1.25.0

func IsInBubble()bool

IsInBubble reports whether the current goroutine is in a bubble.

funcRun

func Run(f func())

funcWait

func Wait()

Types

typeAssociationadded ingo1.25.0

type Associationint

Association is the state of a pointer's bubble association.

funcAssociateadded 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.

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

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp