EventLoop.registerIdle

Token registerIdle(WatcherCallback callback) @trusted nothrow

Register an idle watcher.

IDLE watchers fire once per loop iteration when no other events were dispatched (no I/O ready, no timers expired, no signals received). This happens regardless of what other watchers are registered.

Use IDLE for lightweight background work like cursor blinking or debounced rendering. For periodic tasks, prefer registerTimer().

Parameters

callbackCallback run when an iteration finishes with no dispatched work.

Returns

New watcher token on success, or Token.invalid with errno set.