async-container 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/container/forked.rb +15 -3
- data/lib/async/container/threaded.rb +12 -1
- data/lib/async/container/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97b99976b04ac8d7725349a23176ff2ca94643a4e95c96b6ab566a957be437d7
|
4
|
+
data.tar.gz: ec7aa60548299430c13b14d6abee5df28ec383b48dafb7e60432574bd07dd6fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b44d6496b6b9fa16bc288ecc66f0ba0645a0b3301d2a32bf53fbf27f993803cba38b6da9208baa3ef6c14fececb9da65cda6ab8d8ae403aa04c666c4077c978
|
7
|
+
data.tar.gz: 61d79bd5e62d8b406ffe88aae129918b5ab7c3de779847e8295e6dff867fdc58573c68e7df7bee585b9b204c6150dd98bc82fc424c8c6643df7eedd9dbd11f7c
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -41,12 +41,24 @@ module Async
|
|
41
41
|
@name = nil
|
42
42
|
end
|
43
43
|
|
44
|
+
def as_json(...)
|
45
|
+
{
|
46
|
+
process_id: ::Process.pid,
|
47
|
+
name: @name,
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
def to_json(...)
|
52
|
+
as_json.to_json(...)
|
53
|
+
end
|
54
|
+
|
44
55
|
# Set the process title to the specified value.
|
45
56
|
# @parameter value [String] The name of the process.
|
46
57
|
def name= value
|
47
|
-
|
48
|
-
|
49
|
-
|
58
|
+
@name = value
|
59
|
+
|
60
|
+
# This sets the process title to an empty string if the name is nil:
|
61
|
+
::Process.setproctitle(@name.to_s)
|
50
62
|
end
|
51
63
|
|
52
64
|
# The name of the process.
|
@@ -53,12 +53,23 @@ module Async
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def initialize(io)
|
56
|
-
@name = nil
|
57
56
|
@thread = ::Thread.current
|
58
57
|
|
59
58
|
super
|
60
59
|
end
|
61
60
|
|
61
|
+
def as_json(...)
|
62
|
+
{
|
63
|
+
process_id: ::Process.pid,
|
64
|
+
thread_id: @thread.object_id,
|
65
|
+
name: @thread.name,
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
def to_json(...)
|
70
|
+
as_json.to_json(...)
|
71
|
+
end
|
72
|
+
|
62
73
|
# Set the name of the thread.
|
63
74
|
# @parameter value [String] The name to set.
|
64
75
|
def name= value
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-container
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -40,7 +40,7 @@ cert_chain:
|
|
40
40
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
41
41
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
42
42
|
-----END CERTIFICATE-----
|
43
|
-
date: 2025-02-
|
43
|
+
date: 2025-02-26 00:00:00.000000000 Z
|
44
44
|
dependencies:
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
46
|
name: async
|
metadata.gz.sig
CHANGED
Binary file
|