async 1.15.2 → 1.15.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55519b5f7b29512eaceee354a771301269e468d10d18d7e23293eb1338b5f07d
4
- data.tar.gz: edddd6b602be01a9bf3cec386746e6de4f95d2f77f614beb1e1e0cb7ae8c615c
3
+ metadata.gz: f1d8ef7fbe5fb3a4f0f2a26d992abd86f5b682b7f1e400fe28cf6407eaa65fb1
4
+ data.tar.gz: 879eb59f05f3195af21f83018e043f808077710e8d527684e715cf52124d4d11
5
5
  SHA512:
6
- metadata.gz: 348c0f62da9255a1c05d4c265445657fca1afdddc468fc9308bd1d4c743d70105e34cb8426859da0f59803e360ba545bf554da5019de18031340739a10df8ef9
7
- data.tar.gz: 0763a3e5b31f0c9a781598d6cb240aba3c5c282ddbbf68c153adf4e0609ca32ba601b86de0be6bf22b4f5563023cd8a4a82e0645038c75379f87138bbbee988a
6
+ metadata.gz: 3c6b8aa080c13320200b17953e5a0f51bedbefcdaeb3c21df0d0e9d52c2ae81c0ec9d3b81e292a9890d3cb44352b93b3b8fdd3c7446de59610af36eb1498848d
7
+ data.tar.gz: d5c08e906390930a34e0439f9077481a139181871ad7ab49b81b2a2f8752e9a02d32520c246c6be5ed2d9e3ff578a317676635fa610fd798e66a550ee5251ae6
data/README.md CHANGED
@@ -301,6 +301,10 @@ end
301
301
 
302
302
  Due to limitations within Ruby and the nature of this library, it is not possible to use `to_enum` on methods which invoke asynchronous behavior. We hope to [fix this issue in the future](https://github.com/socketry/async/issues/23).
303
303
 
304
+ ### Blocking Methods in Standard Library
305
+
306
+ Blocking Ruby methods such as `pop` in the `Queue` class require access to their own threads and will not yield control back to the reactor which can result in a deadlock. As a substitute for the standard library `Queue`, the `Async::Queue` class can be used.
307
+
304
308
  ## Contributing
305
309
 
306
310
  1. Fork it
data/lib/async/logger.rb CHANGED
@@ -69,6 +69,7 @@ module Async
69
69
  @prefix_style = @terminal.color(Terminal::Colors::CYAN)
70
70
  @subject_style = @terminal.color(nil, nil, Terminal::Attributes::BOLD)
71
71
  @exception_title_style = @terminal.color(Terminal::Colors::RED, nil, Terminal::Attributes::BOLD)
72
+ @exception_details_style = @terminal.color(Terminal::Colors::YELLOW)
72
73
  @exception_line_style = @terminal.color(Terminal::Colors::RED)
73
74
 
74
75
  @subjects = {}
@@ -138,7 +139,13 @@ module Async
138
139
  end
139
140
 
140
141
  def format_exception(exception, prefix = nil, pwd: Dir.pwd, output: @output)
141
- output.puts " #{prefix}#{@exception_title_style}#{exception.class}#{@reset_style}: #{exception}"
142
+ lines = exception.message.lines.map{|line| line.chomp!}
143
+
144
+ output.puts " #{prefix}#{@exception_title_style}#{exception.class}#{@reset_style}: #{lines.shift}"
145
+
146
+ lines.each do |line|
147
+ output.puts " #{@exception_details_style}" + line + @reset_style
148
+ end
142
149
 
143
150
  exception.backtrace.each_with_index do |line, index|
144
151
  path, offset, message = line.split(":")
data/lib/async/version.rb CHANGED
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Async
22
- VERSION = "1.15.2"
22
+ VERSION = "1.15.3"
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.2
4
+ version: 1.15.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-01 00:00:00.000000000 Z
11
+ date: 2019-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nio4r