couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [1/2] couch commit: updated refs/heads/master to d405523
Date Thu, 01 Oct 2015 10:17:03 GMT
Repository: couchdb-couch
Updated Branches:
  refs/heads/master 2594c7f12 -> d405523c3


Inherit io_priority from the process creating the stream

COUCHDB-2828
BugzID: 25815


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

Branch: refs/heads/master
Commit: e1d1eeb14dd9a244c98c9610a94debb8b522369f
Parents: 9afa6a0
Author: Levi McAuley <levi@leviaul.com>
Authored: Mon Sep 28 15:20:18 2015 -0700
Committer: Levi McAuley <levi@leviaul.com>
Committed: Wed Sep 30 11:26:49 2015 -0700

----------------------------------------------------------------------
 src/couch_stream.erl | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/e1d1eeb1/src/couch_stream.erl
----------------------------------------------------------------------
diff --git a/src/couch_stream.erl b/src/couch_stream.erl
index 1b51883..913977f 100644
--- a/src/couch_stream.erl
+++ b/src/couch_stream.erl
@@ -51,7 +51,7 @@ open(Fd) ->
     open(Fd, []).
 
 open(Fd, Options) ->
-    gen_server:start_link(couch_stream, {Fd, self(), Options}, []).
+    gen_server:start_link(couch_stream, {Fd, self(), erlang:get(io_priority), Options}, []).
 
 close(Pid) ->
     gen_server:call(Pid, close, infinity).
@@ -198,7 +198,8 @@ write(Pid, Bin) ->
     gen_server:call(Pid, {write, Bin}, infinity).
 
 
-init({Fd, OpenerPid, Options}) ->
+init({Fd, OpenerPid, OpenerPriority, Options}) ->
+    erlang:put(io_priority, OpenerPriority),
     {EncodingFun, EndEncodingFun} =
     case couch_util:get_value(encoding, Options, identity) of
     identity ->


Mime
View raw message