Skip to content

Instantly share code, notes, and snippets.

@blackwolf12333
Created January 12, 2014 12:25
Show Gist options
  • Save blackwolf12333/8383979 to your computer and use it in GitHub Desktop.
Save blackwolf12333/8383979 to your computer and use it in GitHub Desktop.
QueueProducer to prevent passing allong the Queue all the time.
public class QueueProducer {
public static LinkedBlockingQueue queue = new LinkedBlockingQueue<String>();
public static void initiate() {
new Messenger(queue).start();
}
public static void offer(String msg) {
queue.offer(msg);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment