Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested observer #7

Open
RuiAAPeres opened this issue Nov 24, 2017 · 2 comments
Open

Nested observer #7

RuiAAPeres opened this issue Nov 24, 2017 · 2 comments

Comments

@RuiAAPeres
Copy link
Owner

RuiAAPeres commented Nov 24, 2017

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. 馃檲

@din
Copy link

din commented Feb 26, 2018

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

@RuiAAPeres
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants