[DiscordArchive] this one sounds evil, why do you need it?
[DiscordArchive] this one sounds evil, why do you need it?
Archived author: Tea • Posted: 2025-07-09T16:40:22.394000+00:00
Original source
this one sounds evil, why do you need it?
Archived author: Foe • Posted: 2025-07-09T16:43:35.410000+00:00
Original source
we flag the Lua state for reloading, but we don't want to actually reload the state until all scheduled async queries have been handled, so we dont try to call back to a callback function that no longer exists
Archived author: Foe • Posted: 2025-07-09T16:43:52.896000+00:00
Original source
so as long as there's a pending callback we just delay the reload
Archived author: Tea • Posted: 2025-07-09T16:46:46.935000+00:00
Original source
so this means a script can block a reload forever if it keeps scheduling?
Archived author: Foe • Posted: 2025-07-09T16:49:15.296000+00:00
Original source
I guess in theory if it scheduled a new async query on every update tick (or at least before the previously scheduled query has been resolved) then sure
Archived author: Tea • Posted: 2025-07-09T16:49:51.095000+00:00
Original source
like scheduling new async inside the async callback?
Archived author: Foe • Posted: 2025-07-09T16:49:58.993000+00:00
Original source
Or if the callback function itself scheduled a new async query, then yeah
Archived author: Tea • Posted: 2025-07-09T16:51:59.931000+00:00
Original source
would canceling them be a better option?
Archived author: Foe • Posted: 2025-07-09T16:53:38.865000+00:00
Original source
I suppose either canceling them, or queueing the queries and only registering them at the end of the update loop *if* a reload is not scheduled, would both be ways to go about it
Archived author: Foe • Posted: 2025-07-09T16:54:05.426000+00:00
Original source
Though I'd rather prefer cancelling than doing a queue