# Notify

`import { Notify } from "destack:async";`

Asynchronous notification primitive.

```ds title="Notify"
export class Notify {
    state: Atomic<uint64>;
    constructor();
    notified(): Promise<void>;
    notifyOne(): void;
    notifyAll(): void;
}
```

[language/library/src/async/notify.ds:7:30](https://github.com/destack-sh/destack/blob/main/language/library/src/async/notify.ds#L7-L30)

## Members

### `state: Atomic<uint64>`

The notification generation.

### `constructor()`

Create a notification primitive.

### `notified(): Promise<void>`

Wait for the next notification.

### `notifyOne(): void`

Wake one waiting task.

### `notifyAll(): void`

Wake all waiting tasks.
