streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Hager [W2O Group]" <>
Subject Re: LocalStreamBuilder#stop()
Date Wed, 08 Oct 2014 15:34:43 GMT
Terminating threads is never a good idea. Shutdown the providers, give
user an option to set a wait-out time. Default should be 10 minutes or

I┬╣d pattern it off something like the way that ThreadPoolExecutor┬╣s
termination behavior works. (Essentially, that is what you are doing)


On 10/8/14, 10:31 AM, "Ryan Ebanks" <> wrote:

>I've been added tests and fixing some issues in the local stream builder
>class.  I need some input on how the stop() method should work so I can
>write the appropriate tests.
>Option 1.) Gentle Shutdown
>Immediately stop the providers from producing more data, but allow for all
>data currently in the stream to finish processing.  Shutdown time would be
>unknown as a result.
>Option 2.) Forceful Shutdown
>Immediately stop the providers from producing more data, and stop all
>processors/writers.  Data will be left in the pipeline will be discarded.
>shutdown will be immediate
>Option 2b) Forceful Shutdown after small wait
>Immediately stop providers from producing more data.  Give the
>processors/writers a small window to try to finish processing (< 10secs),
>and if not finished, forcefully shutdown all processors/writers.
>These options can be changed in the future as more features are added.
>example once datum tracking is implemented, we will probably want a
>combination of option 1 and 2b.  But we need a defined way for it work
>so tests are testing the correct functionality.
>-Ryan Ebanks

View raw message