fix(citizen-scripting-core): fixed ClearTimeout after Wait#3260
Open
yanislgha wants to merge 1 commit intocitizenfx:masterfrom
Open
fix(citizen-scripting-core): fixed ClearTimeout after Wait#3260yanislgha wants to merge 1 commit intocitizenfx:masterfrom
yanislgha wants to merge 1 commit intocitizenfx:masterfrom
Conversation
471b4b3 to
cec5045
Compare
iridium-cfx
reviewed
Jul 18, 2025
| { | ||
| for (auto it = list->begin(); it != list->end();) | ||
| { | ||
| if (it->bookmark == bookmark) |
Contributor
There was a problem hiding this comment.
This also needs to tell the runtime to cleanup the bookmark. In lua the bookmark represents the thread data's index in the lua registry. If it is not unregistered, it will never be cleaned up.
Contributor
|
@yanislgha can you have a look at what iridium wrote. |
Contributor
|
@yanislgha are you still working on this PR, or would you like me to take over? |
Author
|
I'm in vacation rn so I'll take a look on tuesday if nobody do it :) |
Contributor
|
@yanislgha which tuesday ? |
Contributor
|
@poco8537 you should just take over that tuesday is long gone |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal of this PR
A ClearTimeout() in another thread or after a wait() has no effect, and the SetTimeout continues to execute.
How is this PR achieving the goal
I basically wrote a function to remove a bookmark directly in the
ScriptHost.cppto manage bookmarks between threads, etc.This PR applies to the following area(s)
FiveM, RedM, Server, ScRT: Lua
Successfully tested on
Game builds: v3258
Platforms: Windows, Linux
Checklist
Fixes issues
fixes #3259