Skip to content

Prevent Concurrent Script Loads/Unloads#8687

Open
APickledWalrus wants to merge 2 commits into
dev/patchfrom
patch/prevent-concurrent-reloads
Open

Prevent Concurrent Script Loads/Unloads#8687
APickledWalrus wants to merge 2 commits into
dev/patchfrom
patch/prevent-concurrent-reloads

Conversation

@APickledWalrus

@APickledWalrus APickledWalrus commented Jun 4, 2026

Copy link
Copy Markdown
Member

Problem

It is possible to load/unload a script while it is already being loaded/unloaded. This causes things to blow up.

Solution

Implements file tracking in ScriptLoader to prevent concurrent loads/unloads. I'm feeling slightly mixed on this approach, but it seems to perform well enough (for now). I've also included some changes to the script loading syntaxes to improve their safety.

Includes a minor cleanup of ScriptLoader as well.

Testing Completed

Tested manually with the code of the linked issues.

Supporting Information

I did consider a load/unload queue as an alternative, but the implementation is far more complex (especially to handle with syntax), and I did not feel it was worth it as this time.


Completes:

Related: none
AI assistance: none

@APickledWalrus APickledWalrus requested a review from sovdeeth June 4, 2026 18:17
@APickledWalrus APickledWalrus requested a review from a team as a code owner June 4, 2026 18:17
@APickledWalrus APickledWalrus requested review from cheeezburga and removed request for a team June 4, 2026 18:17
@skriptlang-automation skriptlang-automation Bot added needs reviews A PR that needs additional reviews needs triage An issue that hasn't been classified or verified yet labels Jun 4, 2026
@skriptlang-automation

This comment has been minimized.

@skriptlang-automation skriptlang-automation Bot added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. and removed needs triage An issue that hasn't been classified or verified yet labels Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. needs reviews A PR that needs additional reviews

Projects

None yet

1 participant