/.metadata/.plugins/org.eclipse.core.resources/.history/29/20c447586ba3001e1d98c762f0e1eac2
https://bitbucket.org/fixpoint/connexion · #! · 36 lines · 28 code · 8 blank · 0 comment · 0 complexity · 88b24d708298104bec36d2ed4a908581 MD5 · raw file
- package info.reflectionsofmind.connexion.util;
-
- import java.util.concurrent.Callable;
- import java.util.concurrent.Executors;
- import java.util.concurrent.Future;
- import java.util.concurrent.SynchronousQueue;
-
- public class Waiter<T>
- {
- private T t;
- private final SynchronousQueue<T> queue;
-
- public Waiter()
- {
- this.queue = new SynchronousQueue<T>();
-
- Callable<T> callable = new Callable<T>()
- {
- public T call()
- {
- Waiter.this.t = Waiter.this.queue.take();
- }
- };
- Executors.newSingleThreadExecutor().submit(callable);
- }
-
- public void put(final T object)
- {
-
- }
-
- public Future<T> get()
- {
-
- }
- }