1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
Commit graph

10 commits

Author SHA1 Message Date
Johnny Shields
8a4ef0c16c
[WIP] Refactor: Split out LogWriter from Events (no logic change) (#2798)
* Split out LogWriter from Events

* Improve code comment

* Fix constructor interfaces

* Fix file includes

* Fix specs and requires

* Fix LogWriter

* More fixes

* Fix tests

* Fix specs

* Fix spec

* Fix more specs

* Refactor: Split out LogWriter from Events

* Improve comments

* Fix bundle pruner

Co-authored-by: shields <shields@tablecheck.com>
2022-02-05 10:06:22 -07:00
Jacob Herrington
20dc923b0b
Extract calls to purge_interrupt_queue (#2716)
* Extract calls to purge_interrupt_queue

Move calls to Thread#purge_interrupt_queue to a module function. This
means if/when this pattern needs to change it can change in one place
instead of a dozen or more places.

* Update comment on purge_interrupt_queue [ci skip]
2021-10-01 14:11:15 -06:00
Nate Berkopec
f418a6809a
Add Rubocop for redundant returns 2021-06-10 12:28:35 -06:00
Chris LaRose
de632261ac
Refactor: extract worker process into separate class [changelog skip] (#2374)
* Rename Puma::Cluster::{Worker => WorkerHandle}

This class represents a worker from the perspective of the puma master
process. It provides methods for controlling the process, but doesn't
contain the logic actually executed by the worker.

In preparation for creating a new class that encapsulates the worker
logic, we're renaming this one to WorkerHandle.

* Extract Puma::Cluster::WorkerHandle to a separate file

* Move worker functionality to new class

Before, all functionality of the worker processes was defined in the
Cluster class. In preparation for making it possible to start worker
processes outside of the context of a Cluster instance, we move the
worker functionality into a new class.

This has the additional benefit of delineating exactly the dependencies
of the worker processes, namely the Launcher, options hash, and the
pipes used for inter-process communication.

* Extract nakayoshi_gc to Puma::Util

* Add comment to describe Puma::Cluster::WorkerHandle

* Remove options from Worker constructor

The instance varaible @options can be derived from the @launcher
2020-09-29 07:21:52 -06:00
MSP-Greg
4e78060385
Add more @!attribute tags [skip ci] (#2385) 2020-09-25 12:50:57 -06:00
Bart
ce53f576fd Remove URI backport for Ruby 1.9.3 (#1709)
Ruby 2.2+ has been a requirement since 825bf851f8
2019-02-14 14:37:27 -07:00
schneems
88e51fb08e Freeze all the strings!
Reduces runtime allocation by freezing string literals by default.

We could also remove a ton of manual `.freeze` calls, however the ruby supported version is 2.2 and the magic comment only targets 2.3+.
2018-09-17 11:41:14 -05:00
Francesco Rodriguez
69710ab4a4 Remove support for 1.8.7 and 1.9.2. 2016-09-01 23:58:15 +02:00
Evan Phoenix
537bc21593 Remove rack dependency. Fixes #705
Because frameworks like rails dependent on rack, if puma truly wants to
be able to reload new code and thus new versions of rails, it has to be
able to reload rack as well.

Having a dependency on rack held by puma prevented that from happening
and so that dependency has been removed.
2015-07-14 10:28:59 -07:00
Evan Phoenix
b77e912a38 Add missing file 2013-02-04 22:39:19 -08:00