> @@ -35,14 +35,32 @@
> // guice is single threaded. no need to lock this
> List<Closeable> methodsToClose = Lists.<Closeable> newArrayList();
>
> + public enum State {
> + OPEN,
> + CLOSING,
> + CLOSED
> + }
> +
> + State state;
We discussed with @nacx synchronize close, and did not come to a consensus, I
think that should be threadsafe. AtomicReference a good candidate:
```
this.state.compareAndSet(State.OPEN, State.CLOSING);
.....
this.state.set(State.CLOSED);
```
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/32/files#r4709929