summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2011-09-07 12:19:04 +0100
committerAlexandru Scvortov <alexandru@rabbitmq.com>2011-09-07 12:19:04 +0100
commit61a1102bf96003238c8ac497558d572ee9a06c4a (patch)
tree2393606eb33ed7a0a9d0b1631b61e679bc27d40a
parentaab323198ff4219e36ea1c5e06c5799f12684e23 (diff)
downloadrabbitmq-server-61a1102bf96003238c8ac497558d572ee9a06c4a.tar.gz
patch file2 so that it compiles and runs file_server2 calls through the worker_pool
-rw-r--r--src/file2.erl13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/file2.erl b/src/file2.erl
index f1a8aa9f..b58198b0 100644
--- a/src/file2.erl
+++ b/src/file2.erl
@@ -1,3 +1,6 @@
+%% This is a version of 'file' from R14B03, which runs calls to
+%% file_server2 thorugh the worker_pool.
+
%%
%% %CopyrightBegin%
%%
@@ -16,7 +19,7 @@
%%
%% %CopyrightEnd%
%%
--module(file).
+-module(file2).
%% Interface module for the file server and the file io servers.
@@ -66,7 +69,7 @@
name/0, posix/0]).
%%% Includes and defines
--include("file.hrl").
+-include_lib("kernel/include/file.hrl").
-define(FILE_IO_SERVER_TABLE, file_io_servers).
@@ -1241,7 +1244,11 @@ mode_list(_) ->
%% Functions for communicating with the file server
call(Command, Args) when is_list(Args) ->
- gen_server:call(?FILE_SERVER, list_to_tuple([Command | Args]), infinity).
+ worker_pool:submit(
+ fun () ->
+ gen_server:call(?FILE_SERVER, list_to_tuple([Command | Args]),
+ infinity)
+ end).
check_and_call(Command, Args) when is_list(Args) ->
case check_args(Args) of