fluffle/goirc

Dispatch runLoop deadlock when removing a handler from within a handler

Closed this issue · 2 comments

Spent a while tracking down what was going on - when you try to call a returned Remover's Remove method from within an event handler, it deadlocks because dispatch holds a read lock until it finishes dispatching.

Ah ty, will figure out a solution here.

Sorry about that. Not the first bug caused by over-broad locking. Please can you see if c981f8f fixes your problem? I think it ought to.