Stop gap solution for cython functions breaking in memory monitor (#7687)

This commit is contained in:
Simon Mo 2020-03-21 15:16:12 -07:00 committed by GitHub
parent a7a5d172b1
commit 89d959fd6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -569,7 +569,12 @@ cdef void get_py_stack(c_string* stack_out) nogil:
"""
with gil:
frame = inspect.currentframe()
try:
frame = inspect.currentframe()
except ValueError: # overhead of exception handling is about 20us
stack_out[0] = "".encode("ascii")
return
msg = ""
while frame:
filename = frame.f_code.co_filename