Possible to load an image/file asynchronously in Lua, to show a loading progress bar?

I’m thinking of how SDK QR code generation works, or something equivalent.

It would be great if I could start loading a single big file (the massive image for OUTSIDE PARTIES) and then show a bit of animation as it is read, instead of 2 to 3 seconds of dead time.

Possible? I’m drawing a blank.

Not the end of the world if not—the image is already broken into thirds which lets me show three “steps” if nothing else. But added polish would be cool! (Maybe not cool enough to be worth dropping down to C.)

TIA!

Sounds like a use for a coroutinue. Programming in Lua : 9.1

2 Likes

There it is! Thank you!

1 Like