2. A publishes an event
B subscribes to the event
If lifetime of B < lifetime of A
We can get a memory leak
Weak event pattern
3. Library for composing async/event-based
programs
Event subscription wrapped as IDisposable
Lets you manually unsubscribe
Unsubscription automatic when source runs out
of data to supply
10. ISourceBlock<T>
Source of data; read
ITargetBlock<T>
Where you write the data to
IPropagatorBlock<TIn,TOut>
Propagator; performs data processing/filtering
As with Rx, ready-made implementations
provided
12. Post()
Sends a piece of data to the block for processing
LinkTo ()
Links a block with the next block in the graph
Takes an optional predicate
Returns an Idisposable
CancelationTokenSource if you change your
mind
14. BatchBlock<T>
Combines sets of blocks into an array
JoinBlock<2> and <3>
Collects 2 or 3 inputs into a Tuple<2/3>
BatchJoinBlock
Merger of the above
Collects Tuple<IList<T>,…>
15. Provides a data storage buffer
Can be used synchronously
block.Post()
block.Receive()
or asynchronously
await block.SendAsync()
Await block.ReceiveAsync()