matrix-org / matrix-ircd

An IRCd implementation backed by Matrix.
Apache License 2.0
224 stars 41 forks source link

GSOC 2020: Move from tokio::task::spawn_local to tokio::spawn #72

Closed VanillaBrooks closed 4 years ago

VanillaBrooks commented 4 years ago

This PR makes all types Send, as well as some types (such as StreamFold) Sync as per some of the feedback in #71. Additionally, a few methods were modified to take &self instead of &mut self to satisfy compiler errors with aliasing as a result of some additional Mutexs.

One important note here is that all mutexes added are from std. In the future, this should be updated to use tokio::sync::Mutex, but current method signatures (non-async) currently prevent this.