I understand that to put data into an TPL Dataflow target I can use Post
or SendAsync
Correct
that will return immediately if the item could be put into the target.
Not correct - whose method both return immediately. If you're using the Post
, it will return false
as well.
I understand that SendAsync
will wait longer to try an put it in
Partially correct. SendAsync
will setup a state machine, which eventually will return a result.
however I am not certain what is the meaning of SendAsync
returning false
.
It means that the target block cannot accept the message at the time.
Does SendAsync
returning false
signal that the target (specifically a BufferBlock
) has finished and will never accept more messages?
There are many reasons for that, not only that target is in completed state. For example, it's own buffer may be full of messages, and another doesn't fit in it (if your block is constrained with BoundedCapacity
). So you can't say for sure that the reason the method returned false
is the completed state. However, if you do not limiting the capacity of buffer, it's probably is.
Is it possible that it could start accepting messages later?
No, blocks are designed in a way that they can be completed only once. You need to re-create a block and plug it into the pipeline to restart it.