event-listener
event-listener copied to clipboard
Make this crate `no_std`
If this crate were no_std
, it would allow crates like async-lock
and async-channel
to be used on no_std
as well. I envision an API with a default std
feature, and without it this crate would not depend on parking
(and the wait
API would disappear as well).
However, the current version of the code uses a Mutex
to lock the linked list containing event listeners. Theoretically, we could replace this with an atomic linked list similar to the one used in concurrent-queue
.
This would help smol
be able to be used in embedded systems. Any thoughts on this?
If this can be implemented without spinlock, I tend to accept this.
Resolved by #34