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
use futures::task::SpawnExt;use futures::executor::ThreadPool;use macroquad::prelude::load_texture;asyncfntest_load_texture(dir:&str){println!("test1");load_texture(&dir).await;println!("test2");}#[macroquad::main("test")]asyncfnmain(){let pool = ThreadPool::new().unwrap();let f = test_load_texture("./test.png");
pool.spawn(f).unwrap();println!("Hello there!");}
macroquad assume that all the call are done from the single thread (we have only one thread on wasm anyway), multithreaded calls are not supported by design.
There should be some runtime checks on this, but this is not implemented yet.
Problem
cargo.toml
dependencies:main.rs
:When
./text.png
exists, running the above yieldsNote
This also seems to happen with
Texture2D::from_rgba8()
Could this be related to the behavior discussed in load_texture() memory leak #421?
The text was updated successfully, but these errors were encountered: