diff options
author | Matthew Sackman <matthew@rabbitmq.com> | 2011-01-18 18:09:08 +0000 |
---|---|---|
committer | Matthew Sackman <matthew@rabbitmq.com> | 2011-01-18 18:09:08 +0000 |
commit | ae8bd2a87c455db2808ccf85e5bbee6147a6d46a (patch) | |
tree | 6c5f71ea1e8b44d131aa7eed10b2753bb7409999 | |
parent | eb9d9316f4a4ae13f88ba3f39e1b4e9a67a6ead0 (diff) | |
download | rabbitmq-server-bug23705.tar.gz |
sync_timer => sync_timeoutbug23705
-rw-r--r-- | src/rabbit_amqqueue.erl | 8 | ||||
-rw-r--r-- | src/rabbit_amqqueue_process.erl | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl index 41a0ca12..7ba5a17f 100644 --- a/src/rabbit_amqqueue.erl +++ b/src/rabbit_amqqueue.erl @@ -35,7 +35,7 @@ -export([internal_declare/2, internal_delete/1, maybe_run_queue_via_backing_queue/2, maybe_run_queue_via_backing_queue_async/2, - sync_timer/1, update_ram_duration/1, set_ram_duration_target/2, + sync_timeout/1, update_ram_duration/1, set_ram_duration_target/2, set_maximum_since_use/2, maybe_expire/1, drop_expired/1]). -export([pseudo_queue/2]). -export([lookup/1, with/2, with_or_die/2, assert_equivalence/5, @@ -157,7 +157,7 @@ (pid(), (fun ((A) -> {[rabbit_guid:guid()], A}))) -> 'ok'). -spec(maybe_run_queue_via_backing_queue_async/2 :: (pid(), (fun ((A) -> {[rabbit_guid:guid()], A}))) -> 'ok'). --spec(sync_timer/1 :: (pid()) -> 'ok'). +-spec(sync_timeout/1 :: (pid()) -> 'ok'). -spec(update_ram_duration/1 :: (pid()) -> 'ok'). -spec(set_ram_duration_target/2 :: (pid(), number() | 'infinity') -> 'ok'). -spec(set_maximum_since_use/2 :: (pid(), non_neg_integer()) -> 'ok'). @@ -466,8 +466,8 @@ maybe_run_queue_via_backing_queue(QPid, Fun) -> maybe_run_queue_via_backing_queue_async(QPid, Fun) -> gen_server2:cast(QPid, {maybe_run_queue_via_backing_queue, Fun}). -sync_timer(QPid) -> - gen_server2:cast(QPid, sync_timer). +sync_timeout(QPid) -> + gen_server2:cast(QPid, sync_timeout). update_ram_duration(QPid) -> gen_server2:cast(QPid, update_ram_duration). diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index c028509a..fa425fa8 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -226,7 +226,7 @@ next_state(State) -> ensure_sync_timer(State = #q{sync_timer_ref = undefined}) -> {ok, TRef} = timer:apply_after( - ?SYNC_INTERVAL, rabbit_amqqueue, sync_timer, [self()]), + ?SYNC_INTERVAL, rabbit_amqqueue, sync_timeout, [self()]), State#q{sync_timer_ref = TRef}; ensure_sync_timer(State) -> State. @@ -795,7 +795,7 @@ prioritise_cast(Msg, _State) -> {notify_sent, _ChPid} -> 7; {unblock, _ChPid} -> 7; {maybe_run_queue_via_backing_queue, _Fun} -> 6; - sync_timer -> 6; + sync_timeout -> 6; _ -> 0 end. @@ -1016,8 +1016,8 @@ handle_call({maybe_run_queue_via_backing_queue, Fun}, _From, State) -> handle_cast({maybe_run_queue_via_backing_queue, Fun}, State) -> noreply(maybe_run_queue_via_backing_queue(Fun, State)); -handle_cast(sync_timer, State = #q{backing_queue = BQ, - backing_queue_state = BQS}) -> +handle_cast(sync_timeout, State = #q{backing_queue = BQ, + backing_queue_state = BQS}) -> noreply(State#q{backing_queue_state = BQ:idle_timeout(BQS), sync_timer_ref = undefined}); |