Skip to content

Commit

Permalink
Add comment on the blocking behavior of Run
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Pavlovic <matopavlovic@gmail.com>
  • Loading branch information
matejpavlovic committed May 31, 2022
1 parent b2c9f36 commit 6643e36
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/architecture-decision-records/0003-generalize-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ This approach:
// Note, however, that the implementation may produce output events even without receiving any input.
// Before Run is called, ActiveModule guarantees not to read or write,
// respectively, from eventsIn and to eventsOut.
//
// In general, Run is expected to block until explicitly asked to stop
// (through a module-specific event or by canceling ctx)
// and thus should most likely be run in its own goroutine.
// Run must return after ctx is canceled.
//
// Note that the node does not guarantee to always read events from eventsOut.
Expand Down

0 comments on commit 6643e36

Please sign in to comment.