TPL Data Flow
The TPL DataFlow exposes classes to manipulate data asynchronously. It is based on the Task library and on two the interfaces ISourceBlock<T>
and ITargetBlock<T>
.
The TPL DataFlow exposes classes to manipulate data asynchronously. It is based on the Task library and on two the interfaces ISourceBlock<T>
and ITargetBlock<T>
.
In essence, the classes in this namespace serve the same purpose as the IJob interface and the JobDispatcher classes. But the implementation is quite different.
Read moreIProducerConsumerCollection< T> is the starting point. It is an interface derived from ICollection and IEnumerator
In a previous post, I implemented a JobDispatcher using a queue and a BackgroundWorker. There are 3 simple JobDispatcher I'd like to implement now:
a NullJobDispatcher, that, basically does nothing, a SynchronousJobDispatcher, that execute the job when it is dispatched, a ReactorJobDispatcher, that uses the ThreadPool.
Read moreThe JobDispatcher has to tasks to perform: keeping track of the dispatched jobs and executing them.
So, at one point, Marc and I discussed about adding a virtual Execute(IJob job) method that would Execute the job. This way, inheritors could add tracking or exception handling.
Read more