This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes BlockingQueue - sentinel value Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "BlockingQueue - sentinel value" Watch "BlockingQueue - sentinel value" New topic
Author

BlockingQueue - sentinel value

Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 757

From the javadoc

A BlockingQueue does not accept null elements. Implementations throw NullPointerException on attempts to add, put or offer a null. A null is used as a sentinel value to indicate failure of poll operations.

What is actually a "sentinel value" ?

regards,

Pho
Shahnawaz Shakil
Ranch Hand

Joined: Aug 04, 2008
Posts: 57
Below link will help

http://en.wikipedia.org/wiki/Sentinel_value
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: BlockingQueue - sentinel value
 
Similar Threads
while is while( ! done ) better?
Runtime error
this problem baffles me
Scanner question about hasNext() and next()
Help needed in Generics toArray() method