Class: ConnectionThread
- Inherits:
-
Thread
- Object
- Thread
- ConnectionThread
- Defined in:
- lib/jsonrpc2.0-tcp/ConnectionThread.rb
Instance Method Summary collapse
Instance Method Details
#start_timeout(timeout) ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'lib/jsonrpc2.0-tcp/ConnectionThread.rb', line 2 def start_timeout(timeout) @timeoutThread.exit unless @timeoutThread == nil @timeoutThread = Thread.start(self, timeout) do |thread, timeout| sleep timeout thread.exit end end |
#stop_timeout ⇒ Object
11 12 13 14 15 16 |
# File 'lib/jsonrpc2.0-tcp/ConnectionThread.rb', line 11 def stop_timeout unless @timeoutThread == nil @timeoutThread.exit @timeoutThread = nil end end |