Options
All
  • Public
  • Public/Protected
  • All
Menu

Barrier for critical sections.

The Barrier class blocks critical sections until the downward counter to be zero. Unlike the Latch class, Barrier can re-use the downward counter repeatedly.

author

Jeongho Nam samchon@samchon.org

Hierarchy

Index

Constructors

constructor

  • new Barrier(size: number): Barrier

Methods

arrive

  • arrive(n?: number): Promise<void>

arrive_and_reset

  • arrive_and_reset(): Promise<void>

arrive_and_wait

  • arrive_and_wait(): Promise<void>

wait

  • wait(): Promise<void>

wait_for

  • wait_for(ms: number): Promise<boolean>

wait_until

  • wait_until(at: Date): Promise<boolean>

Generated using TypeDoc