couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [24/26] couch commit: updated refs/heads/windsor-merge to 14dc5e9
Date Tue, 26 Aug 2014 09:46:19 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/94a2474a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/94a2474a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/94a2474a

Branch: refs/heads/windsor-merge
Commit: 94a2474a4ae9cf8e6cce2511ccd26ab343fdeea8
Parents: 4f9cb35
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: Tue Aug 26 10:44:12 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/94a2474a/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