Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

remove sync-spin and sync-parking_lot #250

Open
arnauorriols opened this issue May 26, 2022 · 2 comments
Open

remove sync-spin and sync-parking_lot #250

arnauorriols opened this issue May 26, 2022 · 2 comments
Assignees

Comments

@arnauorriols
Copy link
Contributor

These Mutex implementations are for sync code, and Streams is async. We should implement these for tokio::sync::Mutex, futures::sync::Mutex, and the like. However, what are the use case of these? Why can't people just use whatever they want, when implementing a custom Transport?

@kwek20 kwek20 self-assigned this Aug 5, 2022
@kwek20
Copy link
Contributor

kwek20 commented Aug 11, 2022

https://docs.rs/mutex-trait/latest/mutex_trait/
-> Doesnt do well with the trait in trait, only for fields&params (We could make our own trait)

https://docs.rs/maybe-async/0.2.6/maybe_async/index.html
-> Didnt like the lifetimes we need to keep the async_trait

Could change the trait based on #[cfg(not(feature = "sync"))], but id need to make it for tangle and bucket as well (messy)

Could just remove it.. who doesnt use async nowadays? its even no-std 🤷‍♂

Or just implement a switch for all possible Mutexi... (muti? Mutexes?)

@DyrellC
Copy link
Contributor

DyrellC commented Aug 11, 2022

I'd personally be more in favor of removal, every other aspect of the implementation is async, i'm not sure I see much of a benefit in retaining sync based Mutex's in a fully async implementation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants