Merge pull request #334 from puremourning/fix-node-thread
Fix node thread
This commit is contained in:
commit
b180b14ed4
2 changed files with 8 additions and 4 deletions
|
|
@ -188,11 +188,12 @@ class StackTraceView( object ):
|
||||||
return
|
return
|
||||||
|
|
||||||
def consume_threads( message ):
|
def consume_threads( message ):
|
||||||
|
requesting = False
|
||||||
if self._requesting_threads == StackTraceView.ThreadRequestState.PENDING:
|
if self._requesting_threads == StackTraceView.ThreadRequestState.PENDING:
|
||||||
# We may have hit a thread event, so try again.
|
# We may have hit a thread event, so try again.
|
||||||
self._requesting_threads = StackTraceView.ThreadRequestState.NO
|
self._requesting_threads = StackTraceView.ThreadRequestState.NO
|
||||||
self.LoadThreads( *self._pending_thread_request )
|
self.LoadThreads( *self._pending_thread_request )
|
||||||
return
|
requesting = True
|
||||||
|
|
||||||
self._requesting_threads = StackTraceView.ThreadRequestState.NO
|
self._requesting_threads = StackTraceView.ThreadRequestState.NO
|
||||||
self._pending_thread_request = None
|
self._pending_thread_request = None
|
||||||
|
|
@ -211,8 +212,6 @@ class StackTraceView( object ):
|
||||||
stoppedThreadId = stopEvent.get( 'threadId' )
|
stoppedThreadId = stopEvent.get( 'threadId' )
|
||||||
allThreadsStopped = stopEvent.get( 'allThreadsStopped', False )
|
allThreadsStopped = stopEvent.get( 'allThreadsStopped', False )
|
||||||
|
|
||||||
requesting = False
|
|
||||||
|
|
||||||
# FIXME: This is horribly inefficient
|
# FIXME: This is horribly inefficient
|
||||||
for t in message[ 'body' ][ 'threads' ]:
|
for t in message[ 'body' ][ 'threads' ]:
|
||||||
thread = None
|
thread = None
|
||||||
|
|
@ -240,7 +239,10 @@ class StackTraceView( object ):
|
||||||
# If this is a stopped event, load the stack trace for the "current"
|
# If this is a stopped event, load the stack trace for the "current"
|
||||||
# thread. Don't do this on other thrads requests because some servers
|
# thread. Don't do this on other thrads requests because some servers
|
||||||
# just break when that happens.
|
# just break when that happens.
|
||||||
if infer_current_frame:
|
#
|
||||||
|
# Don't do this if we're also satisfying a cached request already (we'll
|
||||||
|
# do it then)
|
||||||
|
if infer_current_frame and not requesting:
|
||||||
if thread.id == self._current_thread:
|
if thread.id == self._current_thread:
|
||||||
if thread.CanExpand():
|
if thread.CanExpand():
|
||||||
self._LoadStackTrace( thread, True, reason )
|
self._LoadStackTrace( thread, True, reason )
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@
|
||||||
set SCALAR g
|
set SCALAR g
|
||||||
array set ARRAY {key1 value1 key2 value2}
|
array set ARRAY {key1 value1 key2 value2}
|
||||||
|
|
||||||
|
set LIST [list a b c {def} {g h i j} k l m]
|
||||||
|
|
||||||
proc Wrap { body } {
|
proc Wrap { body } {
|
||||||
uplevel 1 $body
|
uplevel 1 $body
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue