About 1,500 results
Open links in new tab
  1. future created by async block is not `Send` - Stack Overflow

    Jan 11, 2023 · The tokio Runtime is usually multi-threaded, meaning that at any .await point your task could get moved from one thread to another. That's why everything that is held across an .await point …

  2. Future is not `Send` as this value is used across an await

    Apr 15, 2023 · Workaround is to use a block, like the OP here suggested. It sometimes can make syntax a bit ugly, and I usually add a TODO in my code to fix it in case this issue is resolved some day.

  3. Pinning Down "Future Is Not Send" Errors | Evan Schwartz

    Feb 3, 2025 · When a value is used across an await point, that value must be stored in the Future. As a result, using a non- Send value across an await point makes the whole Future non- Send.

  4. Future is not Send as this value is used across an await (even ... - GitHub

    Mar 29, 2021 · This error seems confusing because I explicitly drop page before the await. Furthermore, in a different code sample (presented below this error message) that does the same thing (I think), …

  5. Rust "future cannot be sent between threads safely"

    Aug 29, 2021 · Roughly speaking, the native mutex forces the lock to be kept in the same thread, but async runtime does not understand it. If your lock does not cross with an async, then you can use …

  6. Invalid "future is not `Send` as this value is used across an await ...

    Sep 1, 2023 · Invalid "future is not Send as this value is used across an await" #115437 New issue

  7. Why "future is not `Send` as this value is used across an await" and ...

    Apr 8, 2020 · The "across" is due to impl FnMut(). must be callable multiple times so references will be made. Alternative fix is change to impl FnOnce() and add the move.

  8. Send Approximation - Asynchronous Programming in Rust

    In order to successfully work around this issue, you may have to introduce a block scope encapsulating any non- Send variables. This makes it easier for the compiler to tell that these variables do not live …

  9. Future trait - 100 Exercises To Learn Rust

    That's why .await points are also known as yield points: your future yields control back to the runtime that was polling it, allowing the runtime to pause it and (if necessary) schedule another task for …

  10. async/await - Asynchronous Programming in Rust

    When .await is called on a Future, it will attempt to run it to completion. If the Future is blocked, it will yield control of the current thread. When more progress can be made, the Future will be picked up by …