-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QDEL_IN harddel prevention #60937
QDEL_IN harddel prevention #60937
Conversation
You currently have a negative Fix/Feature pull request delta of -2. Maintainers may close this PR at will. Fixing issues or improving the codebase will improve this score. |
@@ -1,4 +1,4 @@ | |||
#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE) | |||
#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, time > GC_FILTER_QUEUE ? WEAKREF(item) : item), time, TIMER_STOPPABLE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, does qdel()
support dereferencing weakrefs? At a glance this seems like it'd just delete the weakref datum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes #56171
And there's an exemple in crabs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix up the qdel thing
…into qdel_hard_del
Your Fix/Feature pull request delta is now above zero (10). Feel free to make Feature/Balance PRs. |
* QDEL_IN harddel prevention (tgstation#60937) QDEL_IN could hardel if the timer was greater than 5 minutes (time for the qdel queue) we can use weakref to prevent this * QDEL_IN harddel prevention Co-authored-by: BraveMole <bsouchu@gmail.com>
About The Pull Request
QDEL_IN could hardel if the timer was greater than 5 minutes (time for the qdel queue)
we can use weakref to prevent this
Why It's Good For The Game
Changelog
🆑
code: prevent possible QDEL_IN harddel
/:cl: