Use interrupts for Wakers
This is currently blocked waiting for an LLVM bug to be fixed, but we can work on other things to get ready. They tried to fix it, but there were some problems with the patch.
- [ ] Wait for LLVM to fix their bug
- [ ] Send a PR to Rahix/avr-hal to allow enabling interrupts
- [ ] Figure out who should be responsible for listening for interrupts
- Probably the user in the binary crate, but how?
- Expose APIs that are called when an interrupt occurs?
Maybe, for the time being, one could implement a 'custom waker API' that does not use any function pointers? E.g. a global singleton "waker object" that is used unconditionally in all contexts?
@Rahix Yeah, that's definitely possible. However, it will still introduce problems with third-party crates—things from the futures crate that work without alloc, for example.
Looks like the LLVM bug was fixed! https://reviews.llvm.org/D87631
@jeremysalwen I've taken a break from this (well, because of this issue), but if you'd like to follow along, it looks like someone else is working on an executor based on my work: https://www.reddit.com/r/rust/comments/rxmy9k/comment/hrkb7il/?utm_source=share&utm_medium=web2x&context=3