Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • It could cause long waits if he's calling it in a while 1: busyloop. If so, the consumer would not only be reducing the producer's timeslice, but would also spend a lot of time holding the Queue's lock, potentially livelocking the producer. (This is more likely if he has multiple consumer threads.) Commented Oct 1, 2008 at 9:33
  • Good point Brian. I got the impression that eliben wasn't calling this all that frequenctly, but I could be wrong - eliben? Commented Oct 1, 2008 at 10:04
  • Oops, you're right - I missed the part about calling it in an idle event. That wouldn't be enough to cause such problems. Commented Oct 1, 2008 at 12:06