Receiver icon indicating copy to clipboard operation
Receiver copied to clipboard

Nested observer

Open RuiAAPeres opened this issue 6 years ago • 2 comments

In this situation:

receiver.listen { _ in 
    receiver.listen { _ in 
         print("foo bar")
    }
}

Receiver will deadlock, if I am not mistaken because of os_unfair_lock_t. Any hints/suggestions on this would be awesome. 🙈

RuiAAPeres avatar Nov 24 '17 22:11 RuiAAPeres

Hello, I've just encountered this very issue. Is there any way to get around this by maybe using dispatch queues? Thank you!

din avatar Feb 26 '18 02:02 din

Hey @din, this is something I should have fixed a while back. @andersio gave me an idea some time ago.

RuiAAPeres avatar Feb 26 '18 15:02 RuiAAPeres