LinkedBlockingQueue Blocking

I am using a LinkedBlockingQueue and calling the take method to get an object from the queue. The population of this queue is done by another thread.

When I call the take method the queue is empty and the LinkedBlockingQueue awaits. The other thread then runs and populates the LinkedBlockingQueue.

How do I tell the LinkedBlockingQueue that it now contains data and to start getting the records?

[415 byte] By [java_swing_dudea] at [2007-11-27 9:10:11]
# 1
Don't crosspost. It wastes people's time.
jverda at 2007-7-12 21:51:13 > top of Java-index,Java Essentials,Java Programming...
# 2
Apologies, posted twice by mistake
java_swing_dudea at 2007-7-12 21:51:13 > top of Java-index,Java Essentials,Java Programming...
# 3
Oops, yeah. I see now it looks like a double-click.When I first saw it, I thought one was in New To and one was in Programming.Pick one as the "main" one, and provide a link to it from the other one, so the discussion doesn't get fragmented.
jverda at 2007-7-12 21:51:13 > top of Java-index,Java Essentials,Java Programming...
# 4
> How do I tell the LinkedBlockingQueue that it now> contains data and to start getting the records?If I read the docs right, you don't. take() will block until the queue contains something for it to take.
jverda at 2007-7-12 21:51:13 > top of Java-index,Java Essentials,Java Programming...
# 5
Thank you again.
java_swing_dudea at 2007-7-12 21:51:13 > top of Java-index,Java Essentials,Java Programming...