image_pushasynch(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

πŸ¦‹ 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 πŸŽ€

  1. 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 vid you 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