diff options
author | Magnus Ahltorp <map@kth.se> | 2015-09-24 16:38:03 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2015-11-11 13:32:36 +0100 |
commit | 90760d10d14c11ee4c99826163c206bbf20a77f6 (patch) | |
tree | 5965c6bb108538507464d98595cc631dd9441aa7 /src/fsyncport.erl | |
parent | 346a3f973b828abc21cffb8a0a976daddcabe492 (diff) |
Change perm interface to be add/commit based
Diffstat (limited to 'src/fsyncport.erl')
-rw-r--r-- | src/fsyncport.erl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/fsyncport.erl b/src/fsyncport.erl index b688f9c..ef8b37f 100644 --- a/src/fsyncport.erl +++ b/src/fsyncport.erl @@ -4,7 +4,7 @@ -module(fsyncport). -behaviour(gen_server). -export([start_link/0, stop/0]). --export([fsync/1, fsyncall/1]). +-export([fsync/1, fsyncall/2]). %% gen_server callbacks. -export([init/1, handle_call/3, terminate/2, handle_cast/2, handle_info/2, code_change/3]). @@ -19,8 +19,10 @@ stop() -> fsync(Path) -> gen_server:call(?MODULE, {fsync, [Path]}). -fsyncall(Paths) -> - gen_server:call(?MODULE, {fsync, Paths}). +fsyncall([], Timeout) -> + ok; +fsyncall(Paths, Timeout) -> + gen_server:call(?MODULE, {fsync, Paths}, Timeout). -record(state, {idleports, busyports, waiting, requests}). |