#Park an `AssetLoader`'s `BoxedFuture`

1 messages · Page 1 of 1 (latest)

restive willow
#

I have a static variable that should block some AssetLoaders until it's initialized. Is there a way to block the BoxedFutures until it's set, without the future having to check the variable in a loop?

#

Oh, I can run .await directly on an EventListener, maybe that's what I need

hollow flame
#

You can use pollster or futures_lite, both have a block_on

#

If you're in an async context, you should absolutely just .await it

restive willow
#

Good to know, thanks. I can't test it rn bc I'm in the middle of a refactor, but I'll just mark as resolved