summaryrefslogtreecommitdiff
path: root/py/parsenum.h
diff options
context:
space:
mode:
authorAlessandro Gatti <a.gatti@frob.it>2024-08-10 16:37:03 +0200
committerDamien George <damien@micropython.org>2024-08-16 13:45:03 +1000
commit0b75e180a3b9fe72681fb942873102cdf2f4cae1 (patch)
tree3c4d3ba413e515482b2758416968ea1870f4810c /py/parsenum.h
parent092078852e83811a629028b09cde2374fdfd9103 (diff)
esp32/mphalport: Print debug strings even before the GIL is ready.
If verbose debugging is enabled there is some stdout output happening before the GIL is ready (for example, GC initialisation), and the code assumed that no string printing occurred before the interpreter was fully initialised. Printing long strings would operate without holding the GIL, which would crash if string output would happen too early in the startup process. This commit addresses that issue, making sure verbose debugging output will work even before the interpreter is fully initialised (as if it is not yet ready there's no GIL to take care of). Also, the threshold that would indicate whether a string is "long" (and thus requiring a GIL release/lock operation) or not was hardcoded to 20 bytes. This commit makes that configurable, maintaining 20 bytes as a default. Fixes issue #15408. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Diffstat (limited to 'py/parsenum.h')
0 files changed, 0 insertions, 0 deletions