Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JCBC-20: ViewConnection blocks when no ops pending
When getting the next op in the queue we were using the poll() function which immediately returns null if the queue is empty. This immediate return causes the IO thread to spin and consumes a lot of cpu. What we really want is to block when getting an item from the queue until one is available. In order to do this we should be using the take() function. Change-Id: I9a5bcb4c3852976b55b3162fad513156e94aaaf6 Reviewed-on: http://review.couchbase.org/14959 Reviewed-by: Matt Ingenthron <matt@couchbase.com> Tested-by: Michael Wiederhold <mike@couchbase.com>
- Loading branch information
Mike Wiederhold
committed
Jun 29, 2012
1 parent
0af5374
commit e39cd76
Showing
2 changed files
with
29 additions
and
23 deletions.
There are no files selected for viewing
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
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