-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Expose thread IDs to scripting #2026
Comments
@Khaos66 Feel free to open a pull request against the |
I mean i dont see any harm in this and implementation should be simple enough to go straight to PR, but im not sure how hav8ng the thread id in your logs is really that useful. You'll usually be viewing your logs in some sort of dashboard and often times long after the thread has already finished, or even after the application has completely restarted which is arguably worse since now you have multiple threads with the same id). What's your overall goal with this? |
@jonbonazza The goal is to be able to group log messages by thread. As each thread has its own state. The thread ID is the most basic method to find all messages that belong together. I'm open for other options ;) |
@Calinou Sadly, I'm not really good at using GitHub and PRs... It seems I have other changes in my fork and each time I create a PR all the other changes are included... I'm sure there is a way to solve this, that I'm not aware of rn. |
@Calinou Thank you for the PR =) |
@Khaos66 the proposal should stay open until the PR is merged. |
Describe the project you are working on
A small network game with multiple threads
Describe the problem or limitation you are having in your project
Logging in multi-threaded environment is difficult.
I want to be able to see which message was posted by which thread.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Allow GDScript to access the current thread ID
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
I prepared the change in my fork:
KhaosCoders/godot-pg2@1feed85
If this enhancement will not be used often, can it be worked around with a few lines of script?
No
Is there a reason why this should be core and not an add-on in the asset library?
Basic functionallity
The text was updated successfully, but these errors were encountered: