Skip to content

Commit

Permalink
Merge branch 'develop-3.0-292' of https://github.com/basho/riak_core
Browse files Browse the repository at this point in the history
…into develop-3.0-292
  • Loading branch information
martinsumner committed May 7, 2020
2 parents bd1e397 + ecc9dc5 commit 06b078d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion eqc/worker_pool_pulse.erl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ handle_work(Work, _From, State) ->

%% @doc Any amount of work should complete through any size pool.
prop_any_pool() ->
?SETUP(fun setup_and_teardown/1,
?SETUP(fun setup_and_teardown/0,
?FORALL({Seed, ExtraWork, WorkList},
{pulse:seed(),
frequency([{10,true},{1,false}]),
Expand Down
10 changes: 8 additions & 2 deletions src/riak_core_worker_pool.erl
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,14 @@ handle_event(worker_start, StateName, #state{pool=Pool, queue=Q, monitors=Monito
{next_state, queueing, State#state{queue=Rem, monitors=NewMonitors}}
end;
{empty, _} ->
%% StateName might be either 'ready' or 'shutdown'
{next_state, StateName, State}
{next_state,
%% If we are in state queueing with nothing in the queue,
%% move to the ready state so that the next incoming job
%% checks out the new worker from poolboy.
if StateName==queueing -> ready;
true -> StateName
end,
State}
end;
handle_event(_Event, StateName, State) ->
{next_state, StateName, State}.
Expand Down

0 comments on commit 06b078d

Please sign in to comment.