Create a new throttled wrapper around a DirectIpcUtility instance
The DirectIpcUtility instance to wrap
Optional configuration
ReadonlydirectThe underlying DirectIpcUtility instance Use this for non-throttled operations like invoke/handle
ReadonlygetGet the current default timeout
ReadonlygetGet the current array of all registered target processes
ReadonlygetGet this process's identifier
The identifier string or undefined if not set
ReadonlygetGet current registration state
ReadonlyhandleProxy methods (bound in constructor)
Register a handler for invoke calls on a specific channel
ReadonlyinvokeInvoke a handler on another process
ReadonlyremoveReadonlysetSet the default timeout for invoke calls
Access to localEvents emitter for non-throttled DirectIpc internal events (target-added, target-removed, map-updated, message)
Remove a throttled listener
Channel name
Handler function to remove
This instance for chaining
Register a listener for throttled message reception
Multiple messages on the same channel received in one tick will be coalesced, and the listener will be called once with the latest value on the next microtask.
Channel name to listen on
Handler function (receives sender + message args)
This instance for chaining
Send a message to target process(es) using a TargetSelector (throttled)
Multiple calls to the same target+channel in one tick will be coalesced, keeping only the latest message. The message is sent on the next microtask.
TargetSelector specifying which process(es) to send to
Message channel name
Message arguments
// Send to single identifier (throttled)
directIpc.throttled.send({ identifier: 'renderer' }, 'cursor-position', x, y)
// Send to webContentsId (throttled)
directIpc.throttled.send({ webContentsId: 123 }, 'update', data)
// Send to all matching identifiers (throttled)
directIpc.throttled.send({ allIdentifiers: /^renderer/ }, 'broadcast', msg)
DirectIpcUtilityThrottled - Lossy Message Coalescing for Utility Processes
Note: You typically access this via
directIpc.throttledrather than creating instances directly. DirectIpcUtility automatically creates a throttled instance.Provides automatic message throttling using microtask coalescing. This is a lossy communication pattern where intermediate messages are dropped, keeping only the latest message per event loop tick.
How It Works
Send-side coalescing:
Receive-side coalescing:
When to Use Throttled Messages
✅ Use
directIpc.throttledwhen:❌ Use regular
directIpcwhen:Checklist for Correct Usage
Before using
.throttled, verify ALL of these are true:If ANY of these are false, use regular
directIpcmethods instead.Performance Characteristics