You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use the ViEditor to insert text from a thread. I have placed is in a Mutex and lock the mutex prior to using. However, if I try to kick off the thread and pass the Mutex containing the ViEditor I get all sorts of complaints:
error[E0277]: `*mut i32` cannot be sent between threads safely
--> llm/src/main.rs:138:22
|
138 | tokio::spawn(async {
| _________------------_^
| | |
| | required by a bound introduced by this call
139 | | let _ = llm_run(&editor);
140 | | });
| |_________^ `*mut i32` cannot be sent between threads safely
|
= help: within `ViEditor<'_, '_>`, the trait `Send` is not implemented for `*mut i32`
note: required because it appears within the type `onig_sys::ffi::re_registers`
--> /Users/dap/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/onig_sys-69.8.1/src/ffi.rs:589:12
|
589 | pub struct re_registers {
| ^^^^^^^^^^^^
note: required because it appears within the type `onig::region::Region`
--> /Users/dap/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/onig-6.4.0/src/region.rs:14:12
|
14 | pub struct Region {
| ^^^^^^
note: required because it appears within the type `syntect::parsing::regex::Region`
--> /Users/dap/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syntect-5.2.0/src/parsing/regex.rs:19:12
|
...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to use the
ViEditor
to insert text from a thread. I have placed is in aMutex
and lock the mutex prior to using. However, if I try to kick off the thread and pass the Mutex containing theViEditor
I get all sorts of complaints:Beta Was this translation helpful? Give feedback.
All reactions