fix
This commit is contained in:
parent
04d2b6b93b
commit
06a7f51805
2 changed files with 8 additions and 4 deletions
|
|
@ -111,7 +111,7 @@ macro_rules! impl_tuple {
|
||||||
let system_fn = move |args: In<Vec<RN::Value>>, world: &mut World| {
|
let system_fn = move |args: In<Vec<RN::Value>>, world: &mut World| {
|
||||||
let mut runtime = world.get_resource_mut::<RN>().expect("No runtime resource");
|
let mut runtime = world.get_resource_mut::<RN>().expect("No runtime resource");
|
||||||
let args = if RN::needs_own_thread() {
|
let args = if RN::needs_own_thread() {
|
||||||
runtime.with_engine_thread_mut(move |engine| {
|
runtime.with_engine_send_mut(move |engine| {
|
||||||
(
|
(
|
||||||
$($t::from_runtime_value_with_engine(args.get($idx).expect(&format!("Failed to get function argument for index {}", $idx)).clone(), engine), )+
|
$($t::from_runtime_value_with_engine(args.get($idx).expect(&format!("Failed to get function argument for index {}", $idx)).clone(), engine), )+
|
||||||
)
|
)
|
||||||
|
|
@ -128,7 +128,7 @@ macro_rules! impl_tuple {
|
||||||
inner_system.apply_deferred(world);
|
inner_system.apply_deferred(world);
|
||||||
let mut runtime = world.get_resource_mut::<RN>().expect("No runtime resource");
|
let mut runtime = world.get_resource_mut::<RN>().expect("No runtime resource");
|
||||||
if RN::needs_own_thread() {
|
if RN::needs_own_thread() {
|
||||||
runtime.with_engine_thread_mut(move |engine| {
|
runtime.with_engine_send_mut(move |engine| {
|
||||||
Out::into_runtime_value_with_engine(result, engine)
|
Out::into_runtime_value_with_engine(result, engine)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -338,11 +338,15 @@ impl Runtime for RubyRuntime {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn with_engine_mut<T>(&mut self, _f: impl FnOnce(&mut Self::RawEngine) -> T) -> T {
|
fn with_engine_mut<T>(&mut self, _f: impl FnOnce(&mut Self::RawEngine) -> T) -> T {
|
||||||
unimplemented!("Ruby requires single threaded execution, use `with_engine_thread`");
|
unimplemented!(
|
||||||
|
"Ruby runtime requires sending execution to another thread, use `with_engine_mut_send`"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn with_engine<T>(&self, _f: impl FnOnce(&Self::RawEngine) -> T) -> T {
|
fn with_engine<T>(&self, _f: impl FnOnce(&Self::RawEngine) -> T) -> T {
|
||||||
unimplemented!("Ruby requires single threaded execution, use `with_engine_thread`");
|
unimplemented!(
|
||||||
|
"Ruby runtime requires sending execution to another thread, use `with_engine_send`"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn eval(
|
fn eval(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue