kroisse / actix-async-await Goto Github PK
View Code? Open in Web Editor NEWExperimental async/await support for Actix
License: Apache License 2.0
Experimental async/await support for Actix
License: Apache License 2.0
rustc 1.36.0-nightly (5187be620 2019-05-26)
$ cargo +nightly test
error[E0277]: `R` cannot be sent between threads safely
--> src/handler.rs:41:34
|
41 | Arbiter::spawn_async(fut.boxed())
| ^^^^^ `R` cannot be sent between threads safely
|
= help: within `impl core::future::future::Future`, the trait `std::marker::Send` is not implemented for `R`
= help: consider adding a `where R: std::marker::Send` bound
= note: required because it appears within the type `std::option::Option<R>`
= note: required because it appears within the type `[static generator@src/handler.rs:35:30: 40:10 self:handler::ResponseStdFuture<T>, tx:std::option::Option<R> _]`
= note: required because it appears within the type `std::future::GenFuture<[static generator@src/handler.rs:35:30: 40:10 self:handler::ResponseStdFuture<T>, tx:std::option::Option<R> _]>`
= note: required because it appears within the type `impl core::future::future::Future`
error[E0277]: `*mut (dyn core::future::future::Future<Output = T> + 'static)` cannot be sent between threads safely
--> src/handler.rs:41:34
|
41 | Arbiter::spawn_async(fut.boxed())
| ^^^^^ `*mut (dyn core::future::future::Future<Output = T> + 'static)` cannot be sent between threads safely
|
= help: within `impl core::future::future::Future`, the trait `std::marker::Send` is not implemented for `*mut (dyn core::future::future::Future<Output = T> + 'static)`
= note: required because it appears within the type `futures_core::future::future_obj::LocalFutureObj<'static, T>`
= note: required because it appears within the type `handler::ResponseStdFuture<T>`
= note: required because it appears within the type `[static generator@src/handler.rs:35:30: 40:10 self:handler::ResponseStdFuture<T>, tx:std::option::Option<R> _]`
= note: required because it appears within the type `std::future::GenFuture<[static generator@src/handler.rs:35:30: 40:10 self:handler::ResponseStdFuture<T>, tx:std::option::Option<R> _]>`
= note: required because it appears within the type `impl core::future::future::Future`
Basically this project is an experiment until the asynchronous feature in Rust become stable, including async
syntax. Once it has stabilized it will be better that Actix has the support std::future
directly, not to left it in the separated crate.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.