You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main API difference between the two libs is poison detection. Poison detection is useful when panic happens in some thread while others are still runing, but it's not the case in this lib. In a rpc lib, we usually panic when the whole system breaks and can't be recovered, otherwise we should not panic. In another word there's no need to detection mutex poison in madsim.
Apart from poison detection parking_lot locks have better performance in most cases. So switch to parking_lot sync lock is the obvious choice from my view.
The text was updated successfully, but these errors were encountered:
I have done this in #41 (replacing std lock with spin).
In fact, since everything is running on a single thread, we know that there won't be any contention but it's possible to be deadlock. So what we really want is something like RefCell but also Sync. It should panic once try_lock failed.
I have done this in #41 (replacing std lock with spin). In fact, since everything is running on a single thread, we know that there won't be any contention but it's possible to be deadlock. So what we really want is something like RefCell but also Sync. It should panic once try_lock failed.
We can't guarantee the single thread scenario as a multi-thread runtime, such as tokio, may be adopted. I guess you mean single thread in sim scenario.
The main API difference between the two libs is poison detection. Poison detection is useful when panic happens in some thread while others are still runing, but it's not the case in this lib. In a rpc lib, we usually panic when the whole system breaks and can't be recovered, otherwise we should not panic. In another word there's no need to detection mutex poison in madsim.
Apart from poison detection parking_lot locks have better performance in most cases. So switch to parking_lot sync lock is the obvious choice from my view.
The text was updated successfully, but these errors were encountered: