fix Python decoder
This commit is contained in:
parent
a60f4f9ec4
commit
6cfcdc6d0b
4 changed files with 24 additions and 17 deletions
|
@ -91,22 +91,22 @@ async fn load_signal_and_get_timeline(
|
|||
// "Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks."
|
||||
// @TODO Workaround? Is it a problem only for non-Rust components? Is it needed only when there is a problem in the component (e.g. "`Err` value: wasm trap: cannot enter component instance"?)
|
||||
// let value = std::thread::spawn(move || {
|
||||
// futures::executor::block_on(async move {
|
||||
let decoders = component_manager::DECODERS.read().await;
|
||||
let mut store_lock = component_manager::STORE.lock().await;
|
||||
let mut store = store_lock.as_context_mut();
|
||||
// futures::executor::block_on(async move {
|
||||
let decoders = component_manager::DECODERS.read().await;
|
||||
let mut store_lock = component_manager::STORE.lock().await;
|
||||
let mut store = store_lock.as_context_mut();
|
||||
|
||||
for decoder in decoders.iter() {
|
||||
value = decoder
|
||||
.component_decoder_decoder()
|
||||
.call_format_signal_value(&mut store, &value)
|
||||
// @TODO Resolve panic when running non-Rust components:
|
||||
// `Err` value: wasm trap: cannot enter component instance
|
||||
// https://github.com/bytecodealliance/wasmtime/issues/8670 ?
|
||||
.unwrap()
|
||||
}
|
||||
// value
|
||||
// })
|
||||
for decoder in decoders.iter() {
|
||||
value = decoder
|
||||
.component_decoder_decoder()
|
||||
.call_format_signal_value(&mut store, &value)
|
||||
// @TODO Resolve panic when running non-Rust components:
|
||||
// `Err` value: wasm trap: cannot enter component instance
|
||||
// https://github.com/bytecodealliance/wasmtime/issues/8670 ?
|
||||
.unwrap()
|
||||
}
|
||||
// value
|
||||
// })
|
||||
// }).join().unwrap();
|
||||
value
|
||||
})
|
||||
|
|
Reference in a new issue