/** * Waits until value will be set and returns it. * * @return Value which was set using {@link #set(Object, RuntimeException)}. */ public X get() { awaitResult(); if (e != null) throw e; return x; }
/** * Must be called before update begin. */ public void beginUpdate() { Sync<X> sync0; while (!(sync0 = sync).tryAcquireForUpdate()) sync0.awaitResult(); }
/** * Waits until value will be set and returns it. * * @return Value which was set using {@link #set(Object, RuntimeException)}. */ public X get() { awaitResult(); if (e != null) throw e; return x; }
/** * Must be called before update begin. */ public void beginUpdate() { Sync<X> sync0; while (!(sync0 = sync).tryAcquireForUpdate()) sync0.awaitResult(); }