Class: HTTPClient::TimeoutScheduler

Class | HTTPClient::TimeoutScheduler
In: | lib/httpclient/timeout.rb
Parent: | Object

Replaces timeout.rb to avoid Thread creation and scheduling overhead.

You should check another timeout replace in WEBrick. See lib/webrick/utils.rb in ruby/1.9.

About this implementation:

- Do not create Thread for each timeout() call. Just create 1 Thread for timeout scheduler.
- Do not wakeup the scheduler thread so often. Let scheduler thread sleep until the nearest period.

### Methods

cancel new register

### Classes and Modules

Class HTTPClient::TimeoutScheduler::Period

### Public Class methods

new()

Creates new TimeoutScheduler.

### Public Instance methods

cancel(period)

Cancels the given period.

register(thread, sec, ex)

Registers new timeout period.

[Validate]