Skip to content
代码片段 群组 项目
提交 3a1ea22c 编辑于 作者: Matthias Käppler's avatar Matthias Käppler 提交者: Michael Kozono
浏览文件

Introduce `Runtime` class to identify runtime proc

This will serve as the new single access point into
identifying which runtime is active.

Add Process.max_threads method

This will return the maximum concurrency for the given
runtime environment.

Revert to including `defined?` checks for Process

This is based on a reference impl by new relic which they
use to detect the current dispatcher.

Add `name` method, throw if ambiguous

This can be called from an initializer for instance.

Log the current runtime in an initializer

Add `multi_threaded?` and `app_server?` helpers

To allow easier grouping of configuration

Rename `Process` to `Runtime`

And move it into its own file.

Replace all remaining runtime checks with new API

Including a commit body because the danger bot politely asked me
to. There really is nothing else to say.

Prefer `class << self` over `instance_eval`

It seems to be the more widely adopted style.

Simplify `has_instances?` helper method

Fix rubocop offense

Remove max_threads method

This wasn't currently used anywhere and we should define this elsewhere.

Remove references to NR library

This caused some legal questions. We weren't using the instance lookup
before, so it should be OK.
上级 fa78fdbf
加载中
显示
46 个添加38 个删除
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册