Skip to content

Commit 0e150b7

Browse files
authored
docs(doc.go): name MaxConcurrent for ConcurrencyConcurrent in Dispatch Modes (#89)
Rewrites the Dispatch Modes concurrency paragraph: drop/queue/debounce/burst serialize per lock scope; ConcurrencyConcurrent takes no lock and is bounded by RuntimeOptions.MaxConcurrent slots per instance, and a waiting event is ignored if its context ends first. Closes #88 --- _Generated with [`mux`](https://github.com/coder/mux) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
1 parent f115d3a commit 0e150b7

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

‎doc.go‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,14 @@
9595
// before dedupe marking, so the platform's retry is not mistaken for a
9696
// duplicate.
9797
//
98-
// [RuntimeOptions].Concurrency decides what happens to an event that arrives
99-
// while a handler holds its lock scope, which is one thread by default or the
100-
// whole channel with [LockScopeChannel]: [ConcurrencyDrop] (the default),
101-
// [ConcurrencyQueue], [ConcurrencyDebounce], [ConcurrencyConcurrent], or
102-
// [ConcurrencyBurst]. Debounce and burst require deferred dispatch.
98+
// [RuntimeOptions].Concurrency decides how overlapping events are handled.
99+
// [ConcurrencyDrop] (the default), [ConcurrencyQueue], [ConcurrencyDebounce],
100+
// and [ConcurrencyBurst] serialize handlers per lock scope, which is one
101+
// thread by default or the whole channel with [LockScopeChannel]; debounce
102+
// and burst require deferred dispatch. [ConcurrencyConcurrent] takes no lock
103+
// and ignores the lock scope: [RuntimeOptions].MaxConcurrent, which must be
104+
// positive, caps simultaneous handlers per instance, and an event that finds
105+
// every slot busy waits for one and is ignored if its context ends first.
103106
//
104107
// [WithRuntimeOptions] replaces the whole options struct, so start from
105108
// [DefaultRuntimeOptions] and change only the fields you need.

0 commit comments

Comments
 (0)