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:
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:
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
orReproduce deadlock2
and pause app execution, you see blocked threads:Also found this article described same problem.
May be we are using ReactiveKit incorrectly, and you have some suggestion?