trustmaster / goflow

Flow-based and dataflow programming library for Go (golang)
MIT License
1.6k stars 125 forks source link

Wait for current input processing to be finished before closing ports #1

Closed trustmaster closed 12 years ago

trustmaster commented 12 years ago

Currently components are terminated immediately as soon as their inports are closed. But some input can still be in processing after the output is closed, this leads to "send on a closed channel" errors.

Additional synchronization should be added so that when inputs are closed, the component doesn't accept any input anymore, waits until running input handlers finish and closes outports afterwards.