forked from chef/win32-service
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This does not change any specification. This just changes to use a Ruby thread instead of `CreateThread`. It is very very fast to use a Ruby thread from the beginning. Service startup is noticeably slower with Ruby 3. (Please see chef#84). Windows service needs to finish `StartServiceCtrlDispatcher` in 30 seconds by default. With Ruby 3 or later, this problem can cause timeout errors. The more CPUs, the slower it tends to be. Maybe some implementation about threading has changed with Ruby 3 series. The current implementation switches between multiple Ruby threads and non-Ruby threads. This complex process may be unsuitable for Ruby 3. `CreateThread` makes a non-Ruby thread, and it calls Ruby Proc, and it makes a Ruby thread, and ... Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
- Loading branch information
Showing
2 changed files
with
16 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters