What's the difference between ICollector<T>
and IAsyncCollector<T>
in Azure Functions when writing C# functions (also applies to WebJobs)?
I understand from the samples that these are interfaces I can use to bind a function parameter to an output binding. I also understand that the two interfaces have non-async and async method signatures accordingly (i.e. ICollector<T>.Add(item)
and IAsyncCollector<T>.AddAsync(item)
). But what do they do under the covers? Do they actually post data to the output binding, or is it internally buffered and flushed at the end of function execution (in which case, why would there by an AddAsync
method)?