couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1004754 - /couchdb/branches/new_replicator/src/couchdb/couch_work_queue.erl
Date Tue, 05 Oct 2010 18:17:18 GMT
Author: fdmanana
Date: Tue Oct  5 18:17:17 2010
New Revision: 1004754

URL: http://svn.apache.org/viewvc?rev=1004754&view=rev
Log:
Make max number of items an optional parameter.

Modified:
    couchdb/branches/new_replicator/src/couchdb/couch_work_queue.erl

Modified: couchdb/branches/new_replicator/src/couchdb/couch_work_queue.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/new_replicator/src/couchdb/couch_work_queue.erl?rev=1004754&r1=1004753&r2=1004754&view=diff
==============================================================================
--- couchdb/branches/new_replicator/src/couchdb/couch_work_queue.erl (original)
+++ couchdb/branches/new_replicator/src/couchdb/couch_work_queue.erl Tue Oct  5 18:17:17 2010
@@ -75,7 +75,7 @@ handle_call({queue, Item}, From, #q{work
                 items = Q0#q.items + 1,
                 queue = queue:in(Item, Q0#q.queue)},
     case (Q#q.size >= Q#q.max_size) orelse
-            (Q#q.items >= Q#q.max_items) of
+        (is_integer(Q#q.max_items) andalso (Q#q.items >= Q#q.max_items)) of
     true ->
         {noreply, Q#q{blocked = [From | Q#q.blocked]}};
     false ->



Mime
View raw message