DESCRIPTION

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


COMMENTS

author: Kenny Maynard
date: 2012-06-20 01:14:30.942000000

Uploaded patch set 4.

-------------------------------------
author: Andreas Short
date: 2012-06-20 02:30:27.859000000

Patch Set 4: Do not submit

(1 inline comment)

It's okay to address the other issues on another commit, but confused by the test that just makes the specific test sleep a bit.

Line:58, src/test/java/com/couchbase/client/CouchbaseClientTest.java -> Is this intended to test the shutdown?

-------------------------------------
author: Kenny Maynard
date: 2012-06-20 03:00:11.570000000

Patch Set 4:

The reason I was confused was that every test shuts the client down and should fail if it didn't. Also is change removes CPU consumption as opposed to actually fix a bug.

-------------------------------------
