Function burn::tensor::try_read_sync

pub fn try_read_sync<F, T>(f: F) -> Option<T>
where F: Future<Output = T>,
Expand description

Read a future synchronously.

On WASM futures cannot block, so this only succeeds if the future returns immediately. otherwise this returns None.