Code Monkey home page Code Monkey logo

embrio-rs's People

Contributors

arcnmx avatar baloo avatar bors[bot] avatar jrobsonchase avatar nemo157 avatar rajivr avatar rnestler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

embrio-rs's Issues

Remove AtomicBool from Waker

This might be a conceptual misunderstanding on my part, but I believe you can remove the AtomicBool from Waker and this would remove the static lifetime requirement, as the Waker would then have no state - it could be a nullptr and the vtable static.

The key observation is it is not illegal to call poll again on a future that has returned Pending but not invoked the waker, just ill-advised if you can do better. In this case we can't - all the AtomicBool does is move the location of the busy wait.

On armv6m and armv7m the AtomicBool is ultimately duplicating the functionality already provided by the wfe - assuming it isn't actually treated as a noop, in which case busy waiting is the best you can do anyway.

If my reasoning is wrong, I'd be very interested to know as I'm currently working on a PoC embedded_hal, see here, that somewhat relies on this logic being correct...

#[embrio_async] can't handle expressions in macros

Not sure if this is something that's fixable or not. If something.await is in the arguments to a macro expression, it can't be expanded since syn represents the arguments to a macro invocation as an un-parsed TokenStream.

For example, write!(output, "{}", something.read().await) would result in a "await used outside of an async block" compile error since our macro wouldn't see the something.read().await as an expression or be able to traverse it.

I think the only way to solve this reliably would be to somehow ensure that we're the last macro to be expanded, which doesn't seem to be a thing, but there's a pre-rfc that sounds like what we'd need.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.