passenger 3.0.0.pre1 → 3.0.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- data/DEVELOPERS.TXT +2 -2
- data/NEWS +2 -2
- data/Rakefile +1 -1
- data/build/packaging.rb +1 -1
- data/doc/Users guide Apache.html +22 -22
- data/doc/Users guide Apache.txt +2 -2
- data/doc/Users guide Nginx.html +14 -14
- data/doc/Users guide Nginx.txt +3 -2
- data/doc/Users guide Standalone.html +1 -1
- data/doc/cxxapi/Constants_8h_source.html +1 -1
- data/doc/cxxapi/ResourceLocator_8h_source.html +1 -1
- data/doc/rdoc/classes/ConditionVariable.html +215 -0
- data/doc/rdoc/classes/Exception.html +120 -0
- data/doc/rdoc/classes/GC.html +113 -0
- data/doc/rdoc/classes/IO.html +221 -0
- data/doc/rdoc/classes/PhusionPassenger.html +368 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +180 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +647 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +654 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/InvalidPassword.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerAlreadyStarted.html +97 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerError.html +96 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerNotStarted.html +97 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/UnknownMessage.html +96 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +619 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +142 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/MemoryStats.html +368 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/MemoryStats/Process.html +231 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance.html +588 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/CorruptedDirectoryError.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/GenerationsAbsentError.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Group.html +147 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Process.html +279 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/RoleDeniedError.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/StaleDirectoryError.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Stats.html +123 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/UnsupportedGenerationStructureVersionError.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger.html +341 -0
- data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/Log.html +294 -0
- data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/SharedData.html +199 -0
- data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +155 -0
- data/doc/rdoc/classes/PhusionPassenger/AppProcess.html +367 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails.html +95 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails/ApplicationSpawner.html +351 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails/ApplicationSpawner/Error.html +98 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails/CGIFixed.html +200 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails/FrameworkSpawner.html +410 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails/FrameworkSpawner/Error.html +98 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails/RequestHandler.html +156 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRailsExtensions.html +115 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRailsExtensions/AnalyticsLogging.html +202 -0
- data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +172 -0
- data/doc/rdoc/classes/PhusionPassenger/DebugLogging.html +273 -0
- data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +145 -0
- data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +162 -0
- data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +141 -0
- data/doc/rdoc/classes/PhusionPassenger/InvalidPath.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +673 -0
- data/doc/rdoc/classes/PhusionPassenger/MessageChannel/InvalidHashError.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/MessageClient.html +415 -0
- data/doc/rdoc/classes/PhusionPassenger/NativeSupport.html +494 -0
- data/doc/rdoc/classes/PhusionPassenger/NativeSupport/FileSystemWatcher.html +96 -0
- data/doc/rdoc/classes/PhusionPassenger/Packaging.html +129 -0
- data/doc/rdoc/classes/PhusionPassenger/PlatformInfo.html +1758 -0
- data/doc/rdoc/classes/PhusionPassenger/Plugin.html +237 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack.html +91 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +312 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner/Error.html +98 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +218 -0
- data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions.html +114 -0
- data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging.html +256 -0
- data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ACExtension.html +139 -0
- data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ASBenchmarkableExtension.html +118 -0
- data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ExceptionLogger.html +135 -0
- data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +378 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone.html +111 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/AppFinder.html +252 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/Command.html +161 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/ConfigFile.html +368 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/ConfigFile/DisallowedContextError.html +132 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/HelpCommand.html +151 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/Main.html +189 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/PackageRuntimeCommand.html +177 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/RuntimeInstaller.html +341 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/StartCommand.html +203 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/StatusCommand.html +156 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/StopCommand.html +168 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/Utils.html +86 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/VersionCommand.html +135 -0
- data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +125 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils.html +1468 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher.html +204 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher/DirInfo.html +171 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher/FileInfo.html +140 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/HostsFileParser.html +260 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/PseudoIO.html +169 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput.html +265 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput/Tempfile.html +120 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/UnseekableSocket.html +561 -0
- data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +140 -0
- data/doc/rdoc/classes/PhusionPassenger/WSGI.html +89 -0
- data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +182 -0
- data/doc/rdoc/classes/Process.html +115 -0
- data/doc/rdoc/classes/Signal.html +139 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/DEVELOPERS_TXT.html +276 -0
- data/doc/rdoc/files/README.html +157 -0
- data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +92 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +130 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +135 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +128 -0
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools/memory_stats_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools/server_instance_rb.html +132 -0
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/analytics_logger_rb.html +129 -0
- data/doc/rdoc/files/lib/phusion_passenger/app_process_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/classic_rails/application_spawner_rb.html +141 -0
- data/doc/rdoc/files/lib/phusion_passenger/classic_rails/cgi_fixed_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/classic_rails/framework_spawner_rb.html +146 -0
- data/doc/rdoc/files/lib/phusion_passenger/classic_rails/request_handler_rb.html +125 -0
- data/doc/rdoc/files/lib/phusion_passenger/classic_rails_extensions/init_rb.html +132 -0
- data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/debug_logging_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +147 -0
- data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +120 -0
- data/doc/rdoc/files/lib/phusion_passenger/message_client_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/native_support_rb.html +131 -0
- data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/apache_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/binary_compatibility_rb.html +129 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/compiler_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/curl_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/documentation_tools_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/linux_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/operating_system_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/ruby_rb.html +128 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/zlib_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/plugin_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/public_api_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +137 -0
- data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +125 -0
- data/doc/rdoc/files/lib/phusion_passenger/rails3_extensions/init_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +160 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/app_finder_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/command_rb.html +135 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/config_file_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/help_command_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/main_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/package_runtime_command_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/runtime_installer_rb.html +132 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/start_command_rb.html +136 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/status_command_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/stop_command_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/utils_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/version_command_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils/file_system_watcher_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils/hosts_file_parser_rb.html +120 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils/rewindable_input_rb.html +100 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils/tmpdir_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils/unseekable_socket_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +179 -0
- data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +132 -0
- data/doc/rdoc/fr_class_index.html +139 -0
- data/doc/rdoc/fr_file_index.html +109 -0
- data/doc/rdoc/fr_method_index.html +435 -0
- data/doc/rdoc/index.html +26 -0
- data/doc/rdoc/rdoc-style.css +187 -0
- data/ext/apache2/Configuration.hpp +1 -1
- data/ext/apache2/Hooks.cpp +24 -2
- data/ext/common/AgentsStarter.hpp +57 -20
- data/ext/common/Constants.h +1 -1
- data/ext/common/ResourceLocator.h +1 -1
- data/ext/common/Utils/MemZeroGuard.h +1 -1
- data/ext/phusion_passenger/native_support.c +1 -1
- data/lib/phusion_passenger.rb +2 -2
- data/lib/phusion_passenger/abstract_installer.rb +1 -1
- data/lib/phusion_passenger/platform_info/apache.rb +3 -0
- data/lib/phusion_passenger/platform_info/binary_compatibility.rb +3 -1
- data/lib/phusion_passenger/platform_info/compiler.rb +25 -2
- data/lib/phusion_passenger/platform_info/ruby.rb +88 -14
- data/lib/phusion_passenger/templates/standalone/config.erb +9 -16
- metadata +166 -5
- data/ext/common/Utils/foo.cpp +0 -10
data/DEVELOPERS.TXT
CHANGED
data/NEWS
CHANGED
data/Rakefile
CHANGED
data/build/packaging.rb
CHANGED
@@ -147,7 +147,7 @@ task :fakeroot => [:apache2, :nginx] + Packaging::ASCII_DOCS do
|
|
147
147
|
sh "cp #{APACHE2_MODULE} #{fake_apache2_module_dir}/"
|
148
148
|
|
149
149
|
sh "mkdir -p #{fake_certificates_dir}"
|
150
|
-
sh "cp
|
150
|
+
sh "cp misc/*.crt #{fake_certificates_dir}/"
|
151
151
|
|
152
152
|
sh "mkdir -p #{fake_source_root}"
|
153
153
|
spec.files.each do |filename|
|
data/doc/Users guide Apache.html
CHANGED
@@ -2670,9 +2670,8 @@ displaying maintenance.html will work fine even for URLs starting with "/users".
|
|
2670
2670
|
</div>
|
2671
2671
|
<div class="sect2">
|
2672
2672
|
<h3 id="_logging_and_debugging_options">5.13. Logging and debugging options</h3>
|
2673
|
-
|
2674
|
-
<
|
2675
|
-
<h3 id="_passengerloglevel_lt_integer_gt">5.14. PassengerLogLevel <integer></h3>
|
2673
|
+
<div class="sect3">
|
2674
|
+
<h4 id="_passengerloglevel_lt_integer_gt">5.13.1. PassengerLogLevel <integer></h4>
|
2676
2675
|
<div class="paragraph"><p>This option allows one to specify how much information Phusion Passenger should
|
2677
2676
|
write to the Apache error log file. A higher log level value means that more
|
2678
2677
|
information will be logged.</p></div>
|
@@ -2704,17 +2703,18 @@ information will be logged.</p></div>
|
|
2704
2703
|
<div class="paragraph"><p>This option may only occur once, in the global server configuration.
|
2705
2704
|
The default is <em>0</em>.</p></div>
|
2706
2705
|
</div>
|
2707
|
-
<div class="
|
2708
|
-
<
|
2706
|
+
<div class="sect3">
|
2707
|
+
<h4 id="_passengerdebuglogfile_lt_filename_gt">5.13.2. PassengerDebugLogFile <filename></h4>
|
2709
2708
|
<div class="paragraph"><p>By default Phusion Passenger debugging and error messages are written to the global
|
2710
2709
|
web server error log. This option allows one to specify the file that debugging and
|
2711
2710
|
error messages should be written to instead.</p></div>
|
2712
2711
|
<div class="paragraph"><p>This option may only occur once, in the global server configuration.</p></div>
|
2713
2712
|
</div>
|
2713
|
+
</div>
|
2714
2714
|
<div class="sect2">
|
2715
|
-
<h3 id="_ruby_on_rails_specific_options">5.
|
2715
|
+
<h3 id="_ruby_on_rails_specific_options">5.14. Ruby on Rails-specific options</h3>
|
2716
2716
|
<div class="sect3">
|
2717
|
-
<h4 id="_railsautodetect_lt_on_off_gt">5.
|
2717
|
+
<h4 id="_railsautodetect_lt_on_off_gt">5.14.1. RailsAutoDetect <on|off></h4>
|
2718
2718
|
<div class="paragraph"><p>Whether Phusion Passenger should automatically detect whether a virtual host’s
|
2719
2719
|
document root is a Ruby on Rails application. The default is <em>on</em>.</p></div>
|
2720
2720
|
<div class="paragraph"><p>This option may occur in the global server configuration or in a virtual host
|
@@ -2744,7 +2744,7 @@ application by using the <a href="#RailsBaseURI">RailsBaseURI</a> configuration
|
|
2744
2744
|
</div></div>
|
2745
2745
|
</div>
|
2746
2746
|
<div class="sect3">
|
2747
|
-
<h4 id="RailsBaseURI">5.
|
2747
|
+
<h4 id="RailsBaseURI">5.14.2. RailsBaseURI <uri></h4>
|
2748
2748
|
<div class="paragraph"><p>Used to specify that the given URI is a Rails application. See
|
2749
2749
|
<a href="#deploying_rails_to_sub_uri">Deploying Rails to a sub URI</a> for an example.</p></div>
|
2750
2750
|
<div class="paragraph"><p>It is allowed to specify this option multiple times. Do this to deploy multiple
|
@@ -2774,7 +2774,7 @@ In <em>.htaccess</em>, if <tt>AllowOverride Options</tt> is on.
|
|
2774
2774
|
</ul></div>
|
2775
2775
|
</div>
|
2776
2776
|
<div class="sect3">
|
2777
|
-
<h4 id="rails_env">5.
|
2777
|
+
<h4 id="rails_env">5.14.3. RailsEnv <string></h4>
|
2778
2778
|
<div class="paragraph"><p>This option allows one to specify the default <tt>RAILS_ENV</tt> value.</p></div>
|
2779
2779
|
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
2780
2780
|
<div class="ulist"><ul>
|
@@ -2802,7 +2802,7 @@ In <em>.htaccess</em>, if <tt>AllowOverride Options</tt> is on.
|
|
2802
2802
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>production</em>.</p></div>
|
2803
2803
|
</div>
|
2804
2804
|
<div class="sect3">
|
2805
|
-
<h4 id="_railsframeworkspawneridletime_lt_integer_gt">5.
|
2805
|
+
<h4 id="_railsframeworkspawneridletime_lt_integer_gt">5.14.4. RailsFrameworkSpawnerIdleTime <integer></h4>
|
2806
2806
|
<div class="paragraph"><p>The FrameworkSpawner server (explained in <a href="#spawning_methods_explained">Spawning methods explained</a>) has an idle timeout, just like the backend processes spawned by
|
2807
2807
|
Phusion Passenger do. That is, it will automatically shutdown if it hasn’t done
|
2808
2808
|
anything for a given period.</p></div>
|
@@ -2831,7 +2831,7 @@ In a virtual host configuration block.
|
|
2831
2831
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>1800</em> (30 minutes).</p></div>
|
2832
2832
|
</div>
|
2833
2833
|
<div class="sect3">
|
2834
|
-
<h4 id="_railsappspawneridletime_lt_integer_gt">5.
|
2834
|
+
<h4 id="_railsappspawneridletime_lt_integer_gt">5.14.5. RailsAppSpawnerIdleTime <integer></h4>
|
2835
2835
|
<div class="paragraph"><p>The ApplicationSpawner server (explained in <a href="#spawning_methods_explained">Spawning methods explained</a>) has an idle timeout, just like the backend processes spawned by
|
2836
2836
|
Phusion Passenger do. That is, it will automatically shutdown if it hasn’t done
|
2837
2837
|
anything for a given period.</p></div>
|
@@ -2861,9 +2861,9 @@ In a virtual host configuration block.
|
|
2861
2861
|
</div>
|
2862
2862
|
</div>
|
2863
2863
|
<div class="sect2">
|
2864
|
-
<h3 id="_rack_specific_options">5.
|
2864
|
+
<h3 id="_rack_specific_options">5.15. Rack-specific options</h3>
|
2865
2865
|
<div class="sect3">
|
2866
|
-
<h4 id="_rackautodetect_lt_on_off_gt">5.
|
2866
|
+
<h4 id="_rackautodetect_lt_on_off_gt">5.15.1. RackAutoDetect <on|off></h4>
|
2867
2867
|
<div class="paragraph"><p>Whether Phusion Passenger should automatically detect whether a virtual host’s
|
2868
2868
|
document root is a Rack application. The default is <em>on</em>.</p></div>
|
2869
2869
|
<div class="paragraph"><p>This option may occur in the global server configuration or in a virtual host
|
@@ -2893,7 +2893,7 @@ application by using the <a href="#RackBaseURI">RackBaseURI</a> configuration op
|
|
2893
2893
|
</div></div>
|
2894
2894
|
</div>
|
2895
2895
|
<div class="sect3">
|
2896
|
-
<h4 id="RackBaseURI">5.
|
2896
|
+
<h4 id="RackBaseURI">5.15.2. RackBaseURI <uri></h4>
|
2897
2897
|
<div class="paragraph"><p>Used to specify that the given URI is a Rack application. See
|
2898
2898
|
<a href="#deploying_rack_to_sub_uri">Deploying Rack to a sub URI</a> for an example.</p></div>
|
2899
2899
|
<div class="paragraph"><p>It is allowed to specify this option multiple times. Do this to deploy multiple
|
@@ -2923,7 +2923,7 @@ In <em>.htaccess</em>, if <tt>AllowOverride Options</tt> is on.
|
|
2923
2923
|
</ul></div>
|
2924
2924
|
</div>
|
2925
2925
|
<div class="sect3">
|
2926
|
-
<h4 id="rack_env">5.
|
2926
|
+
<h4 id="rack_env">5.15.3. RackEnv <string></h4>
|
2927
2927
|
<div class="paragraph"><p>The given value will be accessible in Rack applications in the <tt>RACK_ENV</tt>
|
2928
2928
|
environment variable. This allows one to define the environment in which
|
2929
2929
|
Rack applications are run, very similar to <tt>RAILS_ENV</tt>.</p></div>
|
@@ -2954,27 +2954,27 @@ In <em>.htaccess</em>, if <tt>AllowOverride Options</tt> is on.
|
|
2954
2954
|
</div>
|
2955
2955
|
</div>
|
2956
2956
|
<div class="sect2">
|
2957
|
-
<h3 id="_deprecated_options">5.
|
2957
|
+
<h3 id="_deprecated_options">5.16. Deprecated options</h3>
|
2958
2958
|
<div class="paragraph"><p>The following options have been deprecated, but are still supported for backwards
|
2959
2959
|
compatibility reasons.</p></div>
|
2960
2960
|
<div class="sect3">
|
2961
|
-
<h4 id="_railsruby">5.
|
2961
|
+
<h4 id="_railsruby">5.16.1. RailsRuby</h4>
|
2962
2962
|
<div class="paragraph"><p>Deprecated in favor of <a href="#PassengerRuby">PassengerRuby</a>.</p></div>
|
2963
2963
|
</div>
|
2964
2964
|
<div class="sect3">
|
2965
|
-
<h4 id="_railsuserswitching">5.
|
2965
|
+
<h4 id="_railsuserswitching">5.16.2. RailsUserSwitching</h4>
|
2966
2966
|
<div class="paragraph"><p>Deprecated in favor of <a href="#PassengerUserSwitching">PassengerUserSwitching</a>.</p></div>
|
2967
2967
|
</div>
|
2968
2968
|
<div class="sect3">
|
2969
|
-
<h4 id="_railsdefaultuser">5.
|
2969
|
+
<h4 id="_railsdefaultuser">5.16.3. RailsDefaultUser</h4>
|
2970
2970
|
<div class="paragraph"><p>Deprecated in favor of <a href="#PassengerDefaultUser">PassengerDefaultUser</a>.</p></div>
|
2971
2971
|
</div>
|
2972
2972
|
<div class="sect3">
|
2973
|
-
<h4 id="_railsallowmodrewrite">5.
|
2973
|
+
<h4 id="_railsallowmodrewrite">5.16.4. RailsAllowModRewrite</h4>
|
2974
2974
|
<div class="paragraph"><p>This option doesn’t do anything anymore in recent versions of Phusion Passenger.</p></div>
|
2975
2975
|
</div>
|
2976
2976
|
<div class="sect3">
|
2977
|
-
<h4 id="_railsspawnmethod">5.
|
2977
|
+
<h4 id="_railsspawnmethod">5.16.5. RailsSpawnMethod</h4>
|
2978
2978
|
<div class="paragraph"><p>Deprecated in favor of <a href="#PassengerSpawnMethod">PassengerSpawnMethod</a>.</p></div>
|
2979
2979
|
</div>
|
2980
2980
|
</div>
|
@@ -4476,7 +4476,7 @@ has no effect.</p></div>
|
|
4476
4476
|
<div id="footnotes"><hr /></div>
|
4477
4477
|
<div id="footer">
|
4478
4478
|
<div id="footer-text">
|
4479
|
-
Last updated 2010-09-
|
4479
|
+
Last updated 2010-09-15 16:19:46 CEST
|
4480
4480
|
</div>
|
4481
4481
|
</div>
|
4482
4482
|
</body>
|
data/doc/Users guide Apache.txt
CHANGED
@@ -1523,7 +1523,7 @@ displaying maintenance.html will work fine even for URLs starting with "/users".
|
|
1523
1523
|
|
1524
1524
|
=== Logging and debugging options ===
|
1525
1525
|
|
1526
|
-
|
1526
|
+
==== PassengerLogLevel <integer> ====
|
1527
1527
|
This option allows one to specify how much information Phusion Passenger should
|
1528
1528
|
write to the Apache error log file. A higher log level value means that more
|
1529
1529
|
information will be logged.
|
@@ -1540,7 +1540,7 @@ Possible values are:
|
|
1540
1540
|
This option may only occur once, in the global server configuration.
|
1541
1541
|
The default is '0'.
|
1542
1542
|
|
1543
|
-
|
1543
|
+
==== PassengerDebugLogFile <filename> ====
|
1544
1544
|
By default Phusion Passenger debugging and error messages are written to the global
|
1545
1545
|
web server error log. This option allows one to specify the file that debugging and
|
1546
1546
|
error messages should be written to instead.
|
data/doc/Users guide Nginx.html
CHANGED
@@ -2240,9 +2240,8 @@ the request ending up at a different web server in the cluster.</p></div>
|
|
2240
2240
|
</div>
|
2241
2241
|
<div class="sect2">
|
2242
2242
|
<h3 id="_logging_and_debugging_options">5.8. Logging and debugging options</h3>
|
2243
|
-
|
2244
|
-
<
|
2245
|
-
<h3 id="_passenger_log_level_lt_integer_gt">5.9. passenger_log_level <integer></h3>
|
2243
|
+
<div class="sect3">
|
2244
|
+
<h4 id="_passenger_log_level_lt_integer_gt">5.8.1. passenger_log_level <integer></h4>
|
2246
2245
|
<div class="paragraph"><p>This option allows one to specify how much information Phusion Passenger should
|
2247
2246
|
write to the Nginx error log file. A higher log level value means that more
|
2248
2247
|
information will be logged.</p></div>
|
@@ -2274,17 +2273,18 @@ information will be logged.</p></div>
|
|
2274
2273
|
<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
|
2275
2274
|
The default is <em>0</em>.</p></div>
|
2276
2275
|
</div>
|
2277
|
-
<div class="
|
2278
|
-
<
|
2276
|
+
<div class="sect3">
|
2277
|
+
<h4 id="_passenger_debug_log_file_lt_filename_gt">5.8.2. passenger_debug_log_file <filename></h4>
|
2279
2278
|
<div class="paragraph"><p>By default Phusion Passenger debugging and error messages are written to the global
|
2280
2279
|
web server error log. This option allows one to specify the file that debugging and
|
2281
2280
|
error messages should be written to instead.</p></div>
|
2282
2281
|
<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.</p></div>
|
2283
2282
|
</div>
|
2283
|
+
</div>
|
2284
2284
|
<div class="sect2">
|
2285
|
-
<h3 id="_ruby_on_rails_specific_options">5.
|
2285
|
+
<h3 id="_ruby_on_rails_specific_options">5.9. Ruby on Rails-specific options</h3>
|
2286
2286
|
<div class="sect3">
|
2287
|
-
<h4 id="RailsEnv">5.
|
2287
|
+
<h4 id="RailsEnv">5.9.1. rails_env <string></h4>
|
2288
2288
|
<div class="paragraph"><p>This option allows one to specify the default <tt>RAILS_ENV</tt> value.</p></div>
|
2289
2289
|
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
2290
2290
|
<div class="ulist"><ul>
|
@@ -2312,7 +2312,7 @@ In an <em>if</em> configuration scope.
|
|
2312
2312
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>production</em>.</p></div>
|
2313
2313
|
</div>
|
2314
2314
|
<div class="sect3">
|
2315
|
-
<h4 id="_rails_framework_spawner_idle_time_lt_integer_gt">5.
|
2315
|
+
<h4 id="_rails_framework_spawner_idle_time_lt_integer_gt">5.9.2. rails_framework_spawner_idle_time <integer></h4>
|
2316
2316
|
<div class="paragraph"><p>The FrameworkSpawner server (explained in <a href="#spawning_methods_explained">Spawning methods explained</a>) has an idle timeout, just like the backend processes spawned by
|
2317
2317
|
Phusion Passenger do. That is, it will automatically shutdown if it hasn’t done
|
2318
2318
|
anything for a given period.</p></div>
|
@@ -2351,7 +2351,7 @@ In an <em>if</em> configuration scope.
|
|
2351
2351
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>1800</em> (30 minutes).</p></div>
|
2352
2352
|
</div>
|
2353
2353
|
<div class="sect3">
|
2354
|
-
<h4 id="_rails_app_spawner_idle_time_lt_integer_gt">5.
|
2354
|
+
<h4 id="_rails_app_spawner_idle_time_lt_integer_gt">5.9.3. rails_app_spawner_idle_time <integer></h4>
|
2355
2355
|
<div class="paragraph"><p>The ApplicationSpawner server (explained in <a href="#spawning_methods_explained">Spawning methods explained</a>) has an idle timeout, just like the backend processes spawned by
|
2356
2356
|
Phusion Passenger do. That is, it will automatically shutdown if it hasn’t done
|
2357
2357
|
anything for a given period.</p></div>
|
@@ -2391,9 +2391,9 @@ In an <em>if</em> configuration scope.
|
|
2391
2391
|
</div>
|
2392
2392
|
</div>
|
2393
2393
|
<div class="sect2">
|
2394
|
-
<h3 id="_rack_specific_options">5.
|
2394
|
+
<h3 id="_rack_specific_options">5.10. Rack-specific options</h3>
|
2395
2395
|
<div class="sect3">
|
2396
|
-
<h4 id="RackEnv">5.
|
2396
|
+
<h4 id="RackEnv">5.10.1. rack_env <string></h4>
|
2397
2397
|
<div class="paragraph"><p>This option allows one to specify the default <tt>RACK_ENV</tt> value.</p></div>
|
2398
2398
|
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
2399
2399
|
<div class="ulist"><ul>
|
@@ -2422,11 +2422,11 @@ In an <em>if</em> configuration scope.
|
|
2422
2422
|
</div>
|
2423
2423
|
</div>
|
2424
2424
|
<div class="sect2">
|
2425
|
-
<h3 id="_deprecated_options">5.
|
2425
|
+
<h3 id="_deprecated_options">5.11. Deprecated options</h3>
|
2426
2426
|
<div class="paragraph"><p>The following options have been deprecated, but are still supported for backwards
|
2427
2427
|
compatibility reasons.</p></div>
|
2428
2428
|
<div class="sect3">
|
2429
|
-
<h4 id="_rails_spawn_method">5.
|
2429
|
+
<h4 id="_rails_spawn_method">5.11.1. rails_spawn_method</h4>
|
2430
2430
|
<div class="paragraph"><p>Deprecated in favor of <a href="#PassengerSpawnMethod">passenger_spawn_method</a>.</p></div>
|
2431
2431
|
</div>
|
2432
2432
|
</div>
|
@@ -3426,7 +3426,7 @@ has no effect.</p></div>
|
|
3426
3426
|
<div id="footnotes"><hr /></div>
|
3427
3427
|
<div id="footer">
|
3428
3428
|
<div id="footer-text">
|
3429
|
-
Last updated 2010-09-
|
3429
|
+
Last updated 2010-09-15 16:20:02 CEST
|
3430
3430
|
</div>
|
3431
3431
|
</div>
|
3432
3432
|
</body>
|
data/doc/Users guide Nginx.txt
CHANGED
@@ -1218,7 +1218,8 @@ Yes. And it does not perform any certificate validation.
|
|
1218
1218
|
|
1219
1219
|
|
1220
1220
|
=== Logging and debugging options ===
|
1221
|
-
|
1221
|
+
|
1222
|
+
==== passenger_log_level <integer> ====
|
1222
1223
|
This option allows one to specify how much information Phusion Passenger should
|
1223
1224
|
write to the Nginx error log file. A higher log level value means that more
|
1224
1225
|
information will be logged.
|
@@ -1235,7 +1236,7 @@ Possible values are:
|
|
1235
1236
|
This option may only occur once, in the 'http' configuration block.
|
1236
1237
|
The default is '0'.
|
1237
1238
|
|
1238
|
-
|
1239
|
+
==== passenger_debug_log_file <filename> ====
|
1239
1240
|
By default Phusion Passenger debugging and error messages are written to the global
|
1240
1241
|
web server error log. This option allows one to specify the file that debugging and
|
1241
1242
|
error messages should be written to instead.
|
@@ -51,7 +51,7 @@
|
|
51
51
|
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define _PASSENGER_CONSTANTS_H_</span>
|
52
52
|
<a name="l00027"></a>00027 <span class="preprocessor"></span>
|
53
53
|
<a name="l00028"></a>00028 <span class="comment">/* Don't forget to update lib/phusion_passenger.rb too. */</span>
|
54
|
-
<a name="l00029"></a>00029 <span class="preprocessor">#define PASSENGER_VERSION "3.0.0.
|
54
|
+
<a name="l00029"></a>00029 <span class="preprocessor">#define PASSENGER_VERSION "3.0.0.pre2"</span>
|
55
55
|
<a name="l00030"></a>00030 <span class="preprocessor"></span>
|
56
56
|
<a name="l00031"></a>00031 <span class="preprocessor">#define FEEDBACK_FD 3</span>
|
57
57
|
<a name="l00032"></a>00032 <span class="preprocessor"></span>
|
@@ -99,7 +99,7 @@
|
|
99
99
|
<a name="l00074"></a>00074 <span class="keywordflow">if</span> (nativelyPackaged) {
|
100
100
|
<a name="l00075"></a>00075 <span class="keywordflow">return</span> <span class="stringliteral">"/usr/share/phusion-passenger/certificates"</span>;
|
101
101
|
<a name="l00076"></a>00076 } <span class="keywordflow">else</span> {
|
102
|
-
<a name="l00077"></a>00077 <span class="keywordflow">return</span> root + <span class="stringliteral">"/misc
|
102
|
+
<a name="l00077"></a>00077 <span class="keywordflow">return</span> root + <span class="stringliteral">"/misc"</span>;
|
103
103
|
<a name="l00078"></a>00078 }
|
104
104
|
<a name="l00079"></a>00079 }
|
105
105
|
<a name="l00080"></a>00080 };
|
@@ -0,0 +1,215 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<title>Class: ConditionVariable</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
|
11
|
+
<script language="JavaScript" type="text/javascript">
|
12
|
+
// <![CDATA[
|
13
|
+
|
14
|
+
function toggleSource( id )
|
15
|
+
{
|
16
|
+
var elem
|
17
|
+
var link
|
18
|
+
|
19
|
+
if( document.getElementById )
|
20
|
+
{
|
21
|
+
elem = document.getElementById( id )
|
22
|
+
link = document.getElementById( "l_" + id )
|
23
|
+
}
|
24
|
+
else if ( document.all )
|
25
|
+
{
|
26
|
+
elem = eval( "document.all." + id )
|
27
|
+
link = eval( "document.all.l_" + id )
|
28
|
+
}
|
29
|
+
else
|
30
|
+
return false;
|
31
|
+
|
32
|
+
if( elem.style.display == "block" )
|
33
|
+
{
|
34
|
+
elem.style.display = "none"
|
35
|
+
link.innerHTML = "show source"
|
36
|
+
}
|
37
|
+
else
|
38
|
+
{
|
39
|
+
elem.style.display = "block"
|
40
|
+
link.innerHTML = "hide source"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function openCode( url )
|
45
|
+
{
|
46
|
+
window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
|
47
|
+
}
|
48
|
+
// ]]>
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
|
52
|
+
<body>
|
53
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
+
<td class="file-title"><span class="file-title-prefix">Class</span><br />ConditionVariable</td>
|
55
|
+
<td align="right">
|
56
|
+
<table cellspacing="0" cellpadding="2">
|
57
|
+
<tr valign="top">
|
58
|
+
<td>In:</td>
|
59
|
+
<td>
|
60
|
+
<a href="../files/lib/phusion_passenger/utils_rb.html">lib/phusion_passenger/utils.rb</a>
|
61
|
+
</td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<td>Parent:</td>
|
65
|
+
<td>
|
66
|
+
Object
|
67
|
+
</td>
|
68
|
+
</tr>
|
69
|
+
</table>
|
70
|
+
</td>
|
71
|
+
</tr>
|
72
|
+
</table>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
<div id="content">
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div class="sectiontitle">Methods</div>
|
82
|
+
<ul>
|
83
|
+
<li><a href="#M000003">timed_wait</a></li>
|
84
|
+
<li><a href="#M000004">timed_wait!</a></li>
|
85
|
+
</ul>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
<div class="sectiontitle">Public Instance methods</div>
|
93
|
+
<div class="method">
|
94
|
+
<div class="title">
|
95
|
+
<a name="M000003"></a><b>timed_wait</b>(mutex, secs)
|
96
|
+
</div>
|
97
|
+
<div class="description">
|
98
|
+
<p>
|
99
|
+
This is like ConditionVariable.wait(), but allows one to wait a maximum
|
100
|
+
amount of time. Returns true if this condition was signaled, false if a
|
101
|
+
timeout occurred.
|
102
|
+
</p>
|
103
|
+
</div>
|
104
|
+
<div class="sourcecode">
|
105
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000003_source')" id="l_M000003_source">show source</a> ]</p>
|
106
|
+
<div id="M000003_source" class="dyn-source">
|
107
|
+
<pre>
|
108
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/utils.rb, line 816</span>
|
109
|
+
816: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">timed_wait</span>(<span class="ruby-identifier">mutex</span>, <span class="ruby-identifier">secs</span>)
|
110
|
+
817: <span class="ruby-identifier">ruby_engine</span> = <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">RUBY_ENGINE</span>) <span class="ruby-operator">?</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">:</span> <span class="ruby-value str">"ruby"</span>
|
111
|
+
818: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">></span> <span class="ruby-value">100000000</span>
|
112
|
+
819: <span class="ruby-comment cmt"># NOTE: If one calls timeout() on FreeBSD 5 with an</span>
|
113
|
+
820: <span class="ruby-comment cmt"># argument of more than 100000000, then MRI will become</span>
|
114
|
+
821: <span class="ruby-comment cmt"># stuck in an infite loop, blocking all threads. It seems</span>
|
115
|
+
822: <span class="ruby-comment cmt"># that MRI uses select() to implement sleeping.</span>
|
116
|
+
823: <span class="ruby-comment cmt"># I think that a value of more than 100000000 overflows</span>
|
117
|
+
824: <span class="ruby-comment cmt"># select()'s data structures, causing it to behave incorrectly.</span>
|
118
|
+
825: <span class="ruby-comment cmt"># So we just make sure we can't sleep more than 100000000</span>
|
119
|
+
826: <span class="ruby-comment cmt"># seconds.</span>
|
120
|
+
827: <span class="ruby-identifier">secs</span> = <span class="ruby-value">100000000</span>
|
121
|
+
828: <span class="ruby-keyword kw">end</span>
|
122
|
+
829: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ruby_engine</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"jruby"</span>
|
123
|
+
830: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
124
|
+
831: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>, <span class="ruby-identifier">secs</span>)
|
125
|
+
832: <span class="ruby-keyword kw">else</span>
|
126
|
+
833: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
|
127
|
+
834: <span class="ruby-keyword kw">end</span>
|
128
|
+
835: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">RUBY_VERSION</span> <span class="ruby-operator">>=</span> <span class="ruby-value str">'1.9.2'</span>
|
129
|
+
836: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
130
|
+
837: <span class="ruby-identifier">t1</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
131
|
+
838: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>, <span class="ruby-identifier">secs</span>)
|
132
|
+
839: <span class="ruby-identifier">t2</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
133
|
+
840: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">t2</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">t1</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">secs</span>
|
134
|
+
841: <span class="ruby-keyword kw">else</span>
|
135
|
+
842: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
|
136
|
+
843: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
137
|
+
844: <span class="ruby-keyword kw">end</span>
|
138
|
+
845: <span class="ruby-keyword kw">else</span>
|
139
|
+
846: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
140
|
+
847: <span class="ruby-constant">Timeout</span>.<span class="ruby-identifier">timeout</span>(<span class="ruby-identifier">secs</span>) <span class="ruby-keyword kw">do</span>
|
141
|
+
848: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
|
142
|
+
849: <span class="ruby-keyword kw">end</span>
|
143
|
+
850: <span class="ruby-keyword kw">else</span>
|
144
|
+
851: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
|
145
|
+
852: <span class="ruby-keyword kw">end</span>
|
146
|
+
853: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
147
|
+
854: <span class="ruby-keyword kw">end</span>
|
148
|
+
855: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Timeout</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span>
|
149
|
+
856: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
150
|
+
857: <span class="ruby-keyword kw">end</span>
|
151
|
+
</pre>
|
152
|
+
</div>
|
153
|
+
</div>
|
154
|
+
</div>
|
155
|
+
<div class="method">
|
156
|
+
<div class="title">
|
157
|
+
<a name="M000004"></a><b>timed_wait!</b>(mutex, secs)
|
158
|
+
</div>
|
159
|
+
<div class="description">
|
160
|
+
<p>
|
161
|
+
This is like ConditionVariable.wait(), but allows one to wait a maximum
|
162
|
+
amount of time. Raises Timeout::Error if the timeout has elapsed.
|
163
|
+
</p>
|
164
|
+
</div>
|
165
|
+
<div class="sourcecode">
|
166
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000004_source')" id="l_M000004_source">show source</a> ]</p>
|
167
|
+
<div id="M000004_source" class="dyn-source">
|
168
|
+
<pre>
|
169
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/utils.rb, line 861</span>
|
170
|
+
861: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">timed_wait!</span>(<span class="ruby-identifier">mutex</span>, <span class="ruby-identifier">secs</span>)
|
171
|
+
862: <span class="ruby-identifier">ruby_engine</span> = <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">RUBY_ENGINE</span>) <span class="ruby-operator">?</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">:</span> <span class="ruby-value str">"ruby"</span>
|
172
|
+
863: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">></span> <span class="ruby-value">100000000</span>
|
173
|
+
864: <span class="ruby-comment cmt"># See the corresponding note for timed_wait().</span>
|
174
|
+
865: <span class="ruby-identifier">secs</span> = <span class="ruby-value">100000000</span>
|
175
|
+
866: <span class="ruby-keyword kw">end</span>
|
176
|
+
867: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ruby_engine</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"jruby"</span>
|
177
|
+
868: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
178
|
+
869: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>, <span class="ruby-identifier">secs</span>)
|
179
|
+
870: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Timeout</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span>, <span class="ruby-value str">"Timeout"</span>
|
180
|
+
871: <span class="ruby-keyword kw">end</span>
|
181
|
+
872: <span class="ruby-keyword kw">else</span>
|
182
|
+
873: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
|
183
|
+
874: <span class="ruby-keyword kw">end</span>
|
184
|
+
875: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">RUBY_VERSION</span> <span class="ruby-operator">>=</span> <span class="ruby-value str">'1.9.2'</span>
|
185
|
+
876: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
186
|
+
877: <span class="ruby-identifier">t1</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
187
|
+
878: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>, <span class="ruby-identifier">secs</span>)
|
188
|
+
879: <span class="ruby-identifier">t2</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
189
|
+
880: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">t2</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">t1</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">secs</span>
|
190
|
+
881: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Timeout</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span>, <span class="ruby-value str">"Timeout"</span>
|
191
|
+
882: <span class="ruby-keyword kw">end</span>
|
192
|
+
883: <span class="ruby-keyword kw">else</span>
|
193
|
+
884: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
|
194
|
+
885: <span class="ruby-keyword kw">end</span>
|
195
|
+
886: <span class="ruby-keyword kw">else</span>
|
196
|
+
887: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
197
|
+
888: <span class="ruby-constant">Timeout</span>.<span class="ruby-identifier">timeout</span>(<span class="ruby-identifier">secs</span>) <span class="ruby-keyword kw">do</span>
|
198
|
+
889: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
|
199
|
+
890: <span class="ruby-keyword kw">end</span>
|
200
|
+
891: <span class="ruby-keyword kw">else</span>
|
201
|
+
892: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
|
202
|
+
893: <span class="ruby-keyword kw">end</span>
|
203
|
+
894: <span class="ruby-keyword kw">end</span>
|
204
|
+
895: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
205
|
+
896: <span class="ruby-keyword kw">end</span>
|
206
|
+
</pre>
|
207
|
+
</div>
|
208
|
+
</div>
|
209
|
+
</div>
|
210
|
+
</div>
|
211
|
+
|
212
|
+
</div>
|
213
|
+
|
214
|
+
</body>
|
215
|
+
</html>
|