Skip to content

Instantly share code, notes, and snippets.

@abesto
Created June 13, 2021 22:09
Show Gist options
  • Save abesto/128723dbd85d6e50e7745d9a5de71f24 to your computer and use it in GitHub Desktop.
Save abesto/128723dbd85d6e50e7745d9a5de71f24 to your computer and use it in GitHub Desktop.
Compiling roo v0.1.0 (C:\Users\abesto\Documents\GitHub\roo)
error: future cannot be sent between threads safely
--> src\server.rs:79:9
|
79 | tokio::spawn(async move {
| ^^^^^^^^^^^^ future created by async block is not `Send`
|
::: C:\Users\abesto\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.6.1\src\task\spawn.rs:129:21
|
129 | T: Future + Send + 'static,
| ---- required by this bound in `tokio::spawn`
|
= help: within `mlua::Lua`, the trait `Sync` is not implemented for `*mut c_void`
note: future is not `Send` as this value is used across an await
--> src\server.rs:104:25
|
94 | let chunk = lua.load(&lua_code).set_name(&chunk_name).unwrap();
| ----- has type `LuaChunk<'_, '_>` which is not `Send`
...
104 | if let Err(e) = notify_tx.send(msg).await {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ await occurs here, with `chunk` maybe used later
...
107 | }
| - `chunk` is later dropped here
error: future cannot be sent between threads safely
--> src\server.rs:79:9
|
79 | tokio::spawn(async move {
| ^^^^^^^^^^^^ future created by async block is not `Send`
|
::: C:\Users\abesto\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.6.1\src\task\spawn.rs:129:21
|
129 | T: Future + Send + 'static,
| ---- required by this bound in `tokio::spawn`
|
= help: the trait `std::marker::Send` is not implemented for `dyn std::future::Future<Output = std::result::Result<Value<'_>, mlua::Error>>`
note: future is not `Send` as it awaits another future which is not `Send`
--> src\server.rs:96:26
|
96 | let lua_result = future.await;
| ^^^^^^ await occurs here on type `Pin<Box<dyn std::future::Future<Output = std::result::Result<Value<'_>, mlua::Error>>>>`, which is not `Send`
error: future cannot be sent between threads safely
--> src\server.rs:79:9
|
79 | tokio::spawn(async move {
| ^^^^^^^^^^^^ future created by async block is not `Send`
|
::: C:\Users\abesto\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.6.1\src\task\spawn.rs:129:21
|
129 | T: Future + Send + 'static,
| ---- required by this bound in `tokio::spawn`
|
= help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `*mut c_void`
note: future is not `Send` as this value is used across an await
--> src\server.rs:104:25
|
96 | let lua_result = future.await;
| ---------- has type `std::result::Result<Value<'_>, mlua::Error>` which is not `Send`
...
104 | if let Err(e) = notify_tx.send(msg).await {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ await occurs here, with `lua_result` maybe used later
...
107 | }
| - `lua_result` is later dropped here
error: future cannot be sent between threads safely
--> src\server.rs:79:9
|
79 | tokio::spawn(async move {
| ^^^^^^^^^^^^ future created by async block is not `Send`
|
::: C:\Users\abesto\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.6.1\src\task\spawn.rs:129:21
|
129 | T: Future + Send + 'static,
| ---- required by this bound in `tokio::spawn`
|
= help: within `mlua::Lua`, the trait `Sync` is not implemented for `UnsafeCell<()>`
note: future is not `Send` as this value is used across an await
--> src\server.rs:104:25
|
94 | let chunk = lua.load(&lua_code).set_name(&chunk_name).unwrap();
| ----- has type `LuaChunk<'_, '_>` which is not `Send`
...
104 | if let Err(e) = notify_tx.send(msg).await {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ await occurs here, with `chunk` maybe used later
...
107 | }
| - `chunk` is later dropped here
error: future cannot be sent between threads safely
--> src\server.rs:79:9
|
79 | tokio::spawn(async move {
| ^^^^^^^^^^^^ future created by async block is not `Send`
|
::: C:\Users\abesto\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.6.1\src\task\spawn.rs:129:21
|
129 | T: Future + Send + 'static,
| ---- required by this bound in `tokio::spawn`
|
= help: within `mlua::lua::ExtraData`, the trait `std::marker::Send` is not implemented for `*mut mlua::lua::MemoryInfo`
note: future is not `Send` as this value is used across an await
--> src\server.rs:104:25
|
94 | let chunk = lua.load(&lua_code).set_name(&chunk_name).unwrap();
| ----- has type `LuaChunk<'_, '_>` which is not `Send`
...
104 | if let Err(e) = notify_tx.send(msg).await {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ await occurs here, with `chunk` maybe used later
...
107 | }
| - `chunk` is later dropped here
error: future cannot be sent between threads safely
--> src\server.rs:79:9
|
79 | tokio::spawn(async move {
| ^^^^^^^^^^^^ future created by async block is not `Send`
|
::: C:\Users\abesto\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.6.1\src\task\spawn.rs:129:21
|
129 | T: Future + Send + 'static,
| ---- required by this bound in `tokio::spawn`
|
= help: the trait `Sync` is not implemented for `RefCell<(dyn for<'r, 's> FnMut(&'r mlua::Lua, mlua::Debug<'s>) -> std::result::Result<(), mlua::Error> + 'static)>`
note: future is not `Send` as this value is used across an await
--> src\server.rs:104:25
|
94 | let chunk = lua.load(&lua_code).set_name(&chunk_name).unwrap();
| ----- has type `LuaChunk<'_, '_>` which is not `Send`
...
104 | if let Err(e) = notify_tx.send(msg).await {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ await occurs here, with `chunk` maybe used later
...
107 | }
| - `chunk` is later dropped here
error: future cannot be sent between threads safely
--> src\server.rs:79:9
|
79 | tokio::spawn(async move {
| ^^^^^^^^^^^^ future created by async block is not `Send`
|
::: C:\Users\abesto\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-1.6.1\src\task\spawn.rs:129:21
|
129 | T: Future + Send + 'static,
| ---- required by this bound in `tokio::spawn`
|
= help: the trait `std::marker::Send` is not implemented for `(dyn for<'r, 's> FnMut(&'r mlua::Lua, mlua::Debug<'s>) -> std::result::Result<(), mlua::Error> + 'static)`
note: future is not `Send` as this value is used across an await
--> src\server.rs:104:25
|
94 | let chunk = lua.load(&lua_code).set_name(&chunk_name).unwrap();
| ----- has type `LuaChunk<'_, '_>` which is not `Send`
...
104 | if let Err(e) = notify_tx.send(msg).await {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ await occurs here, with `chunk` maybe used later
...
107 | }
| - `chunk` is later dropped here
error: aborting due to 7 previous errors
error: could not compile `roo`
To learn more, run the command again with --verbose.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment