Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
inprocess: Don't wrap
OsIpcReceiver
to make it Sync
Wrap the inprocess receiver in a simple `RefCell<>` instead of `Arc<Mutex<>>` (again). Adding the mutex here is not a good idea: it only adds overhead and potential errors, since not all of the other backends have a `Sync` receiver either; nor does the `mpsc` mechanism `ipc-channel` is modelled after. In fact it fundamentally violates the "single receiver" aspect of `mpsc`, as outlined in servo#89 (comment) Users can still wrap it explicitly if they need to, and know it doesn't introduce incorrect behaviour in the specific use case. This change mostly reverts the `Receiver` part of 30b2024 ; it doesn't re-introduce the explicit `Sync` declaration for `Receiver` though, as that was/is clearly not true without the Mutex -- nor really desirable, as explained above. This change also doesn't touch the `Sender` part, which is a different story.
- Loading branch information