gruf 2.16.1 → 2.16.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/gruf/controllers/autoloader.rb +16 -1
- data/lib/gruf/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0508561578b2ebd6490bebfeeee8f4442d4bcec1d1cb877dc0005933564fc33
|
4
|
+
data.tar.gz: b4130a47d10681a4876046aa782640091799d99f433cc5f6ae55f6dce1f60ecf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a9e198be4481b4e56c3e57fb7d76be2ce97e6cbe30368fadc990a505d1864c98f1e0d25f02c8209a0dafd89021537b15f6f12a83323ec3c8a7ff114c7c8094b
|
7
|
+
data.tar.gz: 5fc8489af23aa0e387aa84dc4104e7812aa0a767ddb32e6bf83f331442b79073f57c5ef97b2326ff9ec64cebf018d76589ce5f964bf67a69e758dd0780508423
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@ Changelog for the gruf gem. This includes internal history before the gem was ma
|
|
2
2
|
|
3
3
|
### Pending release
|
4
4
|
|
5
|
+
### 2.16.2
|
6
|
+
|
7
|
+
* [#175] Fix code reload thread-safety. Calls to `Zeitwerk::Loader#setup` are now made in a thread-safe manner.
|
8
|
+
|
5
9
|
### 2.16.1
|
6
10
|
|
7
11
|
* Fix issue where default gRPC health check was loaded even if unused or not desired; now only loaded when requested
|
@@ -47,7 +47,11 @@ module Gruf
|
|
47
47
|
# Reload all files managed by the autoloader, if reloading is enabled
|
48
48
|
#
|
49
49
|
def reload
|
50
|
-
|
50
|
+
if @reloading_enabled
|
51
|
+
reload_mutex do
|
52
|
+
@loader.reload
|
53
|
+
end
|
54
|
+
end
|
51
55
|
end
|
52
56
|
|
53
57
|
private
|
@@ -69,6 +73,17 @@ module Gruf
|
|
69
73
|
@loader.eager_load
|
70
74
|
@setup = true
|
71
75
|
end
|
76
|
+
|
77
|
+
##
|
78
|
+
# Handle thread-safe access to the loader
|
79
|
+
#
|
80
|
+
def reload_mutex(&block)
|
81
|
+
@reload_mutex ||= begin
|
82
|
+
require 'monitor'
|
83
|
+
Monitor.new
|
84
|
+
end
|
85
|
+
@reload_mutex.synchronize(&block)
|
86
|
+
end
|
72
87
|
end
|
73
88
|
end
|
74
89
|
end
|
data/lib/gruf/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gruf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.16.
|
4
|
+
version: 2.16.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shaun McCormick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler-audit
|