summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2013-08-08 16:23:26 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2013-08-08 16:23:26 +0100
commit54b6cc2ad64e7954d9e584045c1a0c8724dcb4b7 (patch)
tree6a80e28d5e49295a8e604ef43ed48c515ed4c276
parentc4846ac1875ecab9757846d6463cee8f89bd6fc9 (diff)
downloadrabbitmq-server-54b6cc2ad64e7954d9e584045c1a0c8724dcb4b7.tar.gz
tighter specs
-rw-r--r--src/delegate.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/delegate.erl b/src/delegate.erl
index 03d33d01..68dc1f34 100644
--- a/src/delegate.erl
+++ b/src/delegate.erl
@@ -33,14 +33,14 @@
-export_type([monitor_ref/0]).
-type(monitor_ref() :: reference() | {atom(), pid()}).
--type(fun_or_mfa() :: fun ((pid()) -> any()) | {atom(), atom(), [any()]}).
+-type(fun_or_mfa(A) :: fun ((pid()) -> A) | {atom(), atom(), [any()]}).
-spec(start_link/1 ::
(non_neg_integer()) -> {'ok', pid()} | ignore | {'error', any()}).
--spec(invoke/2 :: ( pid(), fun_or_mfa()) -> any();
- ([pid()], fun_or_mfa()) -> {[{pid(), any()}],
- [{pid(), term()}]}).
--spec(invoke_no_result/2 :: (pid() | [pid()], fun_or_mfa()) -> 'ok').
+-spec(invoke/2 :: ( pid(), fun_or_mfa(A)) -> A;
+ ([pid()], fun_or_mfa(A)) -> {[{pid(), A}],
+ [{pid(), term()}]}).
+-spec(invoke_no_result/2 :: (pid() | [pid()], fun_or_mfa(any())) -> 'ok').
-spec(monitor/2 :: ('process', pid()) -> monitor_ref()).
-spec(demonitor/1 :: (monitor_ref()) -> 'true').
-spec(demonitor/2 :: (monitor_ref(), ['flush']) -> 'true').