summaryrefslogtreecommitdiff
path: root/lib/rack/builder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rack/builder.rb')
-rw-r--r--lib/rack/builder.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/rack/builder.rb b/lib/rack/builder.rb
index bc313568..e6a4fe2d 100644
--- a/lib/rack/builder.rb
+++ b/lib/rack/builder.rb
@@ -93,6 +93,17 @@ module Rack
attr :options
+ # Whether the application server will invoke the application from multiple threads. Implies {reentrant?}.
+ def multithread?
+ @options[:multithread]
+ end
+
+ # Re-entrancy is a feature of event-driven servers which may perform non-blocking operations. When an operation blocks, that particular request may yield and another request may enter the application stack.
+ # @return [Boolean] Whether the application can be invoked multiple times from the same thread.
+ def reentrant?
+ @options[:reentrant]
+ end
+
# Create a new Rack::Builder instance and return the Rack application
# generated from it.
def self.app(default_app = nil, &block)