@flux-control/effect-modbus-rs
    Preparing search index...

    Function createReadDebouncer

    • Creates a read debouncer bound to the current scope.

      As with the write debouncer, the read runs in that scope. A reader interrupted while waiting must not take the batch down with it.

      When the scope closes, readers still waiting are interrupted.

      Parameters

      Returns Effect<ReadDebouncer, never, Scope>

      The scoped debouncer. Waiting readers are interrupted when its scope closes.

      const debouncer = yield* createReadDebouncer({
      window: '5 millis',
      fetch: (spans) => Effect.forEach(spans, (span) => client.readHoldingRegisters(span)),
      });
      // 49 accessors, three transactions:
      yield* Effect.forEach(addresses, debouncer.read, { concurrency: 'unbounded' });