I am building a dataflow pipeline to do various processing (mostly I/O, but some CPU processing) that is in a naturally occurring flow. The flow is currently in this basic pattern:
- Load Data from File
- Parse Record using Transform Block
- Serialize & Upload object to server via REST
This processing pipeline can be started automatically, or via a GUI. For when it's started from the GUI I would like to provide progress messages to the end-user. If I add a BufferBlock
between step 1 & 2 and an ActionBlock
after step 3 and set the options for them to run on the same thread as the UI, will the other blocks still run off the UI using their own threadpool?
I was looking at this MSDN article: http://msdn.microsoft.com/en-us/library/hh228605(v=vs.110).aspx but it wasn't very clear regarding this behavior. Can I fire an event from the pipeline that can run on the UI thread as well to accomplish this?
EDIT: The pipeline would be started from a BackgroundWorker
object on the UI, and not the UI thread directly.