Fix and improve threading behavior in Grumble.

Review Request #13016 — Created May 5, 2023 and submitted — Latest diff uploaded

Information

grumble
main

Reviewers

We now conditionally and safely pull log and emoji index state from the
thread-local storage when needed, initializing it if missing. This is a
change from the previous method where we initialized on module load,
which wasn't sufficient.

The log information now shows details for threads.

A new GRUMBLE_MERGE_THREADS=1 environment variable can now be set to
merge all logs together, instead of having per-thread logs.

There's also a fix for the log filename that ensures we use a base name
and not a full file path in all cases.

Tested these when debugging something with threads and process names
containing full file paths.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Fix and improve threading behavior in Grumble.
We now conditionally and safely pull log and emoji index state from the thread-local storage when needed, initializing it if missing. This is a change from the previous method where we initialized on module load, which wasn't sufficient. The log information now shows details for threads. A new `GRUMBLE_MERGE_THREADS=1` environment variable can now be set to merge all logs together, instead of having per-thread logs. There's also a fix for the log filename that ensures we use a base name and not a full file path in all cases.
71b1aaa5c1c831fdb5a2a51d97b31c119ae1a1e7 Christian Hammond
README.md
grumble/__init__.py
Loading...