Windows Azure Storage Client Library: Parallel Single Blob
Upload Race Condition Can Throw an Unhandled Exception     •
Comments 6   There is a race condition in the current Windows
Azure Storage Client Library that could potentially throw an
unhandled exception under certain circumstances. Essentially the
way the parallel upload executes is by dispatching up to N (N=
CloudBlobClient.ParallelOperationThreadCount) number of
simultaneous block uploads at a time and waiting on one of them
to return via WaitHandle.WaitAny (Note:
CloudBlobClient.ParallelOperationThreadCount is initialized by
default to be the number of logical processors on the machine,
meaning an XL VM will be initialized to 8). Once an operation
returns it will attempt to kick off more operations until it
satisfies the desired parallelism or there is no more data to
write. This loop continues until all data is written and a
subsequent PutBlockList operation is performed.  The bug is that
there is a race condition in the parallel upload feature r