Created
January 12, 2014 12:25
-
-
Save blackwolf12333/8383979 to your computer and use it in GitHub Desktop.
QueueProducer to prevent passing allong the Queue all the time.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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