# EventLoop

`import { EventLoop } from "destack:runtime";`

Event loop state for one worker.

```ds title="EventLoop"
export struct EventLoop {
    taskCount: uint32;
    microtaskCount: uint32;
    timerCount: uint32;
    watchCount: uint32;
    hasPendingWork: boolean;
}
```

[language/library/src/runtime/inspect.ds:46:57](https://github.com/destack-sh/destack/blob/main/language/library/src/runtime/inspect.ds#L46-L57)

## Members

### `taskCount: uint32`

Ready task count.

### `microtaskCount: uint32`

Pending microtask count.

### `timerCount: uint32`

Timer count.

### `watchCount: uint32`

Watch count.

### `hasPendingWork: boolean`

Whether pending work exists.
