async-http 0.79.0 → 0.80.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93d3d9d22a84537ba522b417586a7bc02d243d56defe26fb9a3937470675b244
4
- data.tar.gz: 8c16add5b2c301948235c739d076f92c400cdd745cc36881fac49125a41c5bc4
3
+ metadata.gz: 5a73103da274cc4cac5838409d95a05f1c8a746e0b58dcee062031886061ffb7
4
+ data.tar.gz: da1d5991f78d71c2ab1a3c8ace1d0d8c53831b545bdcfe2f3e93d095bd6389bd
5
5
  SHA512:
6
- metadata.gz: cf362c7394967d2746e6d37984f25f5fc02e8e1fa89b7d5f6afcf31d87e665d75877cd5a9cd920f1ae87b6ecbc73e7d9b7cedc72467a69d95b5d24a04b897a8e
7
- data.tar.gz: e922cf9cfd745423d9350f633d1a152dd8f6e06ae23abd3c8b1e403f49abb7089181aa68a1ded1a329cf2017b7bf98feb6a60fed45e1f8582eb3b01ca401ce4d
6
+ metadata.gz: 4169f9f110a07db5f27b6e083b09b1c6d3f0940269b1d423150993a491c4f3d46dfa4ae227712502b07d4cf949b0186e1e838fa3b77cead2809ee73c30e4500c
7
+ data.tar.gz: a85d33bd88881433c1c33b369027d6ff4f1c095b26ecac5b583b865fe2f8011c6ee7bba6c6f9857c5b1cf1697c4298a5e4c6506da3584d0215682bd4beea9858
checksums.yaml.gz.sig CHANGED
Binary file
@@ -17,7 +17,8 @@ module Async
17
17
 
18
18
  @task = nil
19
19
 
20
- @window_updated = Async::Condition.new
20
+ @guard = ::Mutex.new
21
+ @window_updated = ::ConditionVariable.new
21
22
  end
22
23
 
23
24
  attr :trailer
@@ -33,17 +34,26 @@ module Async
33
34
  end
34
35
 
35
36
  def window_updated(size)
36
- @window_updated.signal
37
+ @guard.synchronize do
38
+ @window_updated.signal
39
+ end
37
40
  end
38
41
 
39
42
  def write(chunk)
40
43
  until chunk.empty?
41
44
  maximum_size = @stream.available_frame_size
42
45
 
43
- while maximum_size <= 0
44
- @window_updated.wait
45
-
46
- maximum_size = @stream.available_frame_size
46
+ # We try to avoid synchronization if possible:
47
+ if maximum_size <= 0
48
+ @guard.synchronize do
49
+ maximum_size = @stream.available_frame_size
50
+
51
+ while maximum_size <= 0
52
+ @window_updated.wait(@guard)
53
+
54
+ maximum_size = @stream.available_frame_size
55
+ end
56
+ end
47
57
  end
48
58
 
49
59
  break unless chunk = send_data(chunk, maximum_size)
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Async
7
7
  module HTTP
8
- VERSION = "0.79.0"
8
+ VERSION = "0.80.0"
9
9
  end
10
10
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.79.0
4
+ version: 0.80.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -58,7 +58,7 @@ cert_chain:
58
58
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
59
59
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
60
60
  -----END CERTIFICATE-----
61
- date: 2024-09-24 00:00:00.000000000 Z
61
+ date: 2024-10-02 00:00:00.000000000 Z
62
62
  dependencies:
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: async
metadata.gz.sig CHANGED
Binary file