This repository has been archived by the owner on Jun 8, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-implement MainContext channel around a manual channel
This allows us to ensure that dropping the Receiver and its GSource will also directly drop the closure, instead of having to wait for all Senders to disappear too. We have to use a mutex and a shared struct for this, and as such it makes sense to directly implement the channel as part of this shared struct. As the std mpsc channel internally also uses mutexes this should not cause any considerable performance difference. At the same time also simplify some more code and add a few more tests. Fixes #454
- Loading branch information