image_pushasynch(3)
π¦ image_pushasynch β bestie's guide to waiting on async loads
okay so literally the whole point of image_pushasynch is: you've got an async load happening in the background, and you want to block on it until it's actually done. that's it. that's the vibe. π
this one lives in the Arcan Lua API manual, section 3, and it's giving "just wait a sec bestie" energy.
β¨ SYNOPSIS β¨
nil
image_pushasynch( vid )
yeah, it returns nil. no cap. it just... blocks and comes back with nothing. and honestly? iconic. π
π NOTES π
- so here's the tea β the exact moment an asynch image gets transformed into a real image type isn't known in advance. like, nobody knows when it happens, not even the code. π so this operation is allowed on any argument, but if the
vidyou hand it isn't in an asynchronous loading state, it literally does not perform any internal state changes. nothing happens. zero. zilch. so don't @ it expecting magic for the non-async cases, fr fr.
also worth knowing β this whole thing is tagged @group: image, so that's where it hangs out in the docs. π«Ά
π EXAMPLE π
function image_pushasynch0()
b = load_image_asynch("test_big.png");
a = load_image_asynch("test_small.png");
show_image({a, b});
image_pushasynch(a);
end
see what's happening here? π two async loads get kicked off β b grabs "test_big.png" and a grabs "test_small.png" β then show_image({a, b}) puts them on screen, and then image_pushasynch(a) blocks until a is actually done loading. main character energy: show first, wait second. lowkey genius. β¨
π SEE ALSO π
mwah π that's the whole page, bestie β go forth and block responsibly. this lil masterpiece is from the Arcan Lua API, dated October 2026. slay. ππ¦π
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms