uwiger / locks

A scalable, deadlock-resolving resource locker
Mozilla Public License 2.0
204 stars 26 forks source link

ask_candidates/2 never demonitors #2

Closed bullno1 closed 9 years ago

bullno1 commented 10 years ago

Every time ask_candidates/2 is called, it monitors all candidates: https://github.com/uwiger/locks/blob/master/src/locks_leader.erl#L238

However, it never demonitors and duplicated or unexpected 'DOWN' messages may happen.

Spawning a middle-man process like how gen_server:multi_call does it or demonitor in collect_replies/1 can solve this problem.

uwiger commented 10 years ago

Noted. I've added demonitor() calls in collect_replies/1 and pushed to master*. Thanks.

uwiger commented 9 years ago

Closing. If this is still a problem, please create a new issue.