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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deadlocks. #279

Open
escfrya opened this issue Apr 26, 2022 · 0 comments
Open

Deadlocks. #279

escfrya opened this issue Apr 26, 2022 · 0 comments

Comments

@escfrya
Copy link

escfrya commented Apr 26, 2022

Hi guys! First of all, thanks for great work!
We use ReactiveKit a lot and after our project was grown we ran into problem with deadlocks.

Most of our Services(business logic) works in this way:

event
    .with(latestFrom: state)
    .map { event, state in
    	var newState = state
    	// Apply event to state
        return newState
    }
    .bind(to: state)

With time logic gets complicated and dependencies to other services state is appear. After that deadlocks started to show up.

I prepared example project to reproduce problem here.

Project contains two cases in which deadlock is reproduced and comparision with other rx implementations(RxSwift, Combine).
RxSwift works similar.
In Combine deadlocks not reproduced.

After click Reproduce deadlock1 or Reproduce deadlock2 and pause app execution, you see blocked threads:
deadlock

Also found this article described same problem.

May be we are using ReactiveKit incorrectly, and you have some suggestion?

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

No branches or pull requests

1 participant