Yes, when SetMetadata returns, the work is done. You can use BeginSetMetadata to do the operation in background. If this operation take a lot, it's a great idea to user BeginSetMetada to do the operation in background.
Marked As Answer byOwen RansenMonday, September 24, 2012 12:04 PM
Does that mean that when SetMetadata returns the blobs data has already been updated and saved?
And BeginSetMetadata is used maybe when you think the operation will take some time?
Yes, but I would rather say it's quite driven by your application design and requirement. Anyway, to understand the completion status of BeginSetMetadata async call you may make use of while IsCompleted property of IAsyncResult returned by it. E.g.
// Perform other operations
Alternately, you can make use of callback delegate which is passed as 2nd argument to BeginSetMetadata method. It will receive notification when the asynchronous operation completes.
If this answers your question, please Mark it as Answer. If this post is helpful, please vote as helpful.