Skip to content

Change multiple LCs into a single ets:match_delete/2. #535

Open
wants to merge 1 commit into from

2 participants

@seancribbs

Cleans up that one obnoxious function clause in the background manager.

@seancribbs seancribbs Change multiple LCs into a single ets:match_delete/2.
c10483f
@jrwest
jrwest commented Feb 20, 2014

eqc failure:

Shrinking......(6 times)
[{set,{var,1},{call,bg_manager_eqc,set_concurrency_limit,[d,1,false]}},
 {set,{var,2},{call,bg_manager_eqc,start_process,[]}},
 {set,{var,3},{call,bg_manager_eqc,get_lock,[d,{var,2},[]]}},
 {set,{var,10},{call,bg_manager_eqc,stop_process,[{var,2}]}},
 {set,{var,11},{call,bg_manager_eqc,all_resources,[all]}}]


Final State:
---------------
alive = true
bypassed = false
enabled = true
procs = [{<0.2851.0>,not_running}]
limits = [{d,1}]
locks = [{d,[{#Ref<0.0.0.6774>,<0.2851.0>,[],released}]}]
counts = []
tokens = []
---------------


background_mgr tables:
---------------
[{enabled,true},{bypassed,false},{{info,d},{resource_info,lock,1,true}}]
---------------
[{{given,d},{resource_entry,d,lock,<0.2851.0>,[],#Ref<0.0.0.6774>}}]
---------------


bg_manager monitors:
---------------
{monitors,[]}
---------------

bg_manager_eqc:set_concurrency_limit(d, 1, false) -> undefined
bg_manager_eqc:start_process() -> <0.2851.0>
bg_manager_eqc:get_lock(d, <0.2851.0>, []) -> #Ref<0.0.0.6774>
bg_manager_eqc:stop_process(<0.2851.0>) -> ok
bg_manager_eqc:all_resources(all) ->
  [#bg_stat_live{
     resource = d, type = lock, owner = {<0.2851.0>, []} }]

Reason: {postcondition, {1, '/=', 0}}
false

investigating...

@jrwest jrwest referenced this pull request Feb 28, 2014
Closed

Enchance/mw/bg manager #538

@jrwest jrwest added this to the 2.0.1 milestone Mar 24, 2014
@jrwest
jrwest commented Mar 24, 2014

marked as milestone 2.0.1 for now. happy to revisit for 2.0-RC if we think its important enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.