Skip to content

Commit

Permalink
set semaphore limit 256
Browse files Browse the repository at this point in the history
  • Loading branch information
White-Green committed Aug 4, 2023
1 parent 87e0d5d commit 4fde394
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/execjs/pcruntime/context_process_runtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ def initialize(name, command, runner_path = File.expand_path('runner.js', __dir_
@runner_path = runner_path
@binary = nil
@deprecated = deprecated
@semaphore = Semaphore.new 100
# macOS limits the number of file descriptors 256,
# so, set semaphore limit half of it
@semaphore = Semaphore.new 128
end

# implementation of ExecJS::Runtime#available?
Expand Down

0 comments on commit 4fde394

Please sign in to comment.