Class Thin::AsyncResponse
In: lib/thin/async.rb
Parent: Object

Response whos body is sent asynchronously.

Methods

<<   callback   cancel_callback   done   done?   finish   new   perform   send_headers   write  

Included Modules

Rack::Response::Helpers

Constants

Marker = [-1, {}, []].freeze

Attributes

callback  [R] 
headers  [R] 
status  [RW] 

Public Class methods

Creates a instance and yields it to the block given returns the async marker

Public Instance methods

<<(body)

Alias for write

Specify a block to be executed when the response is done

Calling this method before the response has completed will cause the callback block to be stored on an internal list. If you call this method after the response is done, the block will be executed immediately.

Cancels an outstanding callback to &block if any. Undoes the action of callback.

Tell Thin the response is complete and the connection can be closed.

Tells if the response has already been completed

Tell Thin the response is gonna be sent asynchronously. The status code of -1 is the magic trick here.

[Validate]