Skip to content

Commit a659a23

Browse files
committed
Add note about compiling with DEBUG_THREADS
1 parent d1c0f43 commit a659a23

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

programming/tasks-and-events/threading.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,13 @@ build Panda3D yourself if you want to take advantage of true threading.
169169
If you wish to disable threading, you can pass the option
170170
``--override HAVE_THREADS=UNDEF`` to makepanda.py. If you wish to use the simple
171171
threading model, you may pass ``--override SIMPLE_THREADS=1`` instead.
172+
173+
Debugging Threading Bugs
174+
------------------------
175+
176+
Due to the nature of threading-related bugs, it can be very difficult to track
177+
down the source of a problem if a piece of code is crashing due to a threading
178+
problem. It may be useful to recompile Panda3D with the ``DEBUG_THREADS=1``
179+
option enabled. This will enable various debug checking tools that will alert
180+
you of incorrect use of threading, rather than crashing. However, there is a
181+
significant performance cost associated with this option.

0 commit comments

Comments
 (0)