This weekend's saga has been, the game engine loads textures async. Since I didn't care about loading times, I put in a "block_on() that async call".
That which worked on linux, but completely failed to work in web assembly, and it took some time to work out what wasn't working. Of course, once I realised, I remembered web programming HAS to use a single thread which (I think) HAS to do background work for any "OS" operations.
So I had to go and add "async fn" and ".await" to all the functions and calls in its call stack. I understand what the "two colours of function" essay was complaining about, the existing syntax for async is off, although I don't agree with his conclusion.
no subject
Date: 2024-10-22 09:30 am (UTC)That which worked on linux, but completely failed to work in web assembly, and it took some time to work out what wasn't working. Of course, once I realised, I remembered web programming HAS to use a single thread which (I think) HAS to do background work for any "OS" operations.
So I had to go and add "async fn" and ".await" to all the functions and calls in its call stack. I understand what the "two colours of function" essay was complaining about, the existing syntax for async is off, although I don't agree with his conclusion.