Class: Byebug::ThreadStopCommand
- Inherits:
-
Command
- Object
- Command
- Byebug::ThreadStopCommand
show all
- Defined in:
- lib/byebug/commands/threads.rb
Overview
Stop execution of a thread.
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match
Class Method Details
.description ⇒ Object
142
143
144
|
# File 'lib/byebug/commands/threads.rb', line 142
def description
%(th[read] stop <n> Stops thread <n>.)
end
|
.names ⇒ Object
138
139
140
|
# File 'lib/byebug/commands/threads.rb', line 138
def names
%w(thread)
end
|
Instance Method Details
#execute ⇒ Object
129
130
131
132
133
134
135
|
# File 'lib/byebug/commands/threads.rb', line 129
def execute
c = parse_thread_num_for_cmd('thread stop', @match[1])
return unless c
c.suspend
display_context(c)
end
|
#regexp ⇒ Object
125
126
127
|
# File 'lib/byebug/commands/threads.rb', line 125
def regexp
/^\s* th(?:read)? \s+ stop \s* (\S*) \s*$/x
end
|