couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [50/50] couch commit: updated refs/heads/master to 9d0ac7d
Date Thu, 28 Aug 2014 12:12:26 GMT
Use an API for setting the mp_att_writers


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/3cd82857
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/3cd82857
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/3cd82857

Branch: refs/heads/master
Commit: 3cd8285727f46cf48339dab64402ceb2456004de
Parents: 7de73cf
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Fri Aug 22 02:13:05 2014 -0500
Committer: Robert Newson <rnewson@apache.org>
Committed: Thu Aug 28 13:00:03 2014 +0100

----------------------------------------------------------------------
 src/couch_doc.erl | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/3cd82857/src/couch_doc.erl
----------------------------------------------------------------------
diff --git a/src/couch_doc.erl b/src/couch_doc.erl
index 74450a4..d92412d 100644
--- a/src/couch_doc.erl
+++ b/src/couch_doc.erl
@@ -447,7 +447,7 @@ doc_from_multi_part_stream(ContentType, DataFun, Ref) ->
     {Parser, ParserRef} = spawn_monitor(fun() ->
         ParentRef = erlang:monitor(process, Parent),
         put(mp_parent_ref, ParentRef),
-        put(num_mp_writers, NumMpWriters),
+        num_mp_writers(NumMpWriters),
         {<<"--",_/binary>>, _, _} = couch_httpd:parse_multipart_request(
             ContentType, DataFun,
             fun(Next) -> mp_parse_doc(Next, []) end),
@@ -594,6 +594,10 @@ maybe_send_data({Ref, Chunks, Offset, Counters, Waiting}) ->
     end.
 
 
+num_mp_writers(N) ->
+    erlang:put(mp_att_writers, N).
+
+
 num_mp_writers() ->
     case erlang:get(mp_att_writers) of
         undefined -> 1;


Mime
View raw message