nspyre.misc._stacktracer

Stack tracer for multi-threaded applications.

From: https://code.activestate.com/recipes/577334-how-to-debug-deadlocked-multi-threaded-programs/

Usage:

from nspyre.misc._stacktracer import trace_start, trace_stop

trace_start(‘trace.html’, interval=1) app.exec() trace_stop()

Module Contents

Classes

TraceDumper

Dump stack traces into a given file periodically.

Functions

stacktraces()

trace_start(fpath[, interval, auto])

Start tracing into the given file.

trace_stop()

Stop tracing.

nspyre.misc._stacktracer.stacktraces()
class nspyre.misc._stacktracer.TraceDumper(fpath, interval, auto)

Dump stack traces into a given file periodically.

Parameters:
  • fpath – File path to output HTML (stack trace file)

  • auto – Set flag (True) to update trace continuously. Clear flag (False) to update only if file not exists. (Then delete the file to force update.)

  • interval – In seconds: how often to update the trace file.

run()

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

stop()
stacktraces()
nspyre.misc._stacktracer.trace_start(fpath, interval=5, auto=True)

Start tracing into the given file.

nspyre.misc._stacktracer.trace_stop()

Stop tracing.