> +         // If a future to delete a blob/directory actually got created 
> above,
> +         // keep a reference of that in the outstandingFutures list. This is
> +         // useful in case of a timeout exception. All outstanding futures 
> can
> +         // then be cancelled.
> +         if (blobDelFuture != null) {
> +            final AtomicReference<ListenableFuture<Void>> 
> atomicBlobDelFuture =
> +               new AtomicReference<ListenableFuture<Void>>(blobDelFuture);
> +            outstandingFutures.add(atomicBlobDelFuture);
> +
> +            // Add a callback to release the semaphore. This is required for
> +            // other threads waiting to acquire a semaphore above to make
> +            // progress.
> +            Futures.addCallback(blobDelFuture, new FutureCallback<Object>() {
> +               @Override
> +               public void onSuccess(final Object o) {
> +                  outstandingFutures.remove(atomicBlobDelFuture);

Done.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/214/files#r10872324

Reply via email to