Class: Byebug::ThreadResumeCommand
- Inherits:
-
Command
- Object
- Command
- Byebug::ThreadResumeCommand
show all
- Defined in:
- lib/byebug/commands/threads.rb
Overview
Resume 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
172
173
174
|
# File 'lib/byebug/commands/threads.rb', line 172
def description
%(th[read] resume <n> Resumes thread <n>.)
end
|
.names ⇒ Object
168
169
170
|
# File 'lib/byebug/commands/threads.rb', line 168
def names
%w(thread)
end
|
Instance Method Details
#execute ⇒ Object
159
160
161
162
163
164
165
|
# File 'lib/byebug/commands/threads.rb', line 159
def execute
c = parse_thread_num_for_cmd('thread resume', @match[1])
return unless c
return errmsg('Already running') unless c.suspended?
c.resume
display_context(c)
end
|
#regexp ⇒ Object
155
156
157
|
# File 'lib/byebug/commands/threads.rb', line 155
def regexp
/^\s* th(?:read)? \s+ resume \s* (\S*) \s*$/x
end
|