stopgap_13632 1.0.1 → 1.1.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
- data/.travis.yml +1 -0
- data/README.md +20 -7
- data/ext/stopgap_13632/extconf.rb +1 -1
- data/ext/stopgap_13632/stopgap_13632.c +2 -2
- data/stopgap_13632.gemspec +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dd690244ac94df39f99d5f37839993514c1a22a
|
4
|
+
data.tar.gz: 6dc6e88bf9e6b59681dc18acb1f34f9898136fb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f7b5875dd88e3c90c4c56a4c09e9de999175f4c6a028d437053c5f386c014d75cdd9d1caa293304ef9e70c322849c1667502d1bad69cda64a99cc51d9a20fb4
|
7
|
+
data.tar.gz: 7212f1dcf74210903f3eb8100ba593d7cbea65c067ea7976be2e153fd53d6af24c69d07c279983a455cfa86c37bde253d535ad9f9f80160f957488d71b8f3fe4
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -2,18 +2,31 @@
|
|
2
2
|
[](https://ci.appveyor.com/api/projects/status/cqgu4tce6of44c9x?svg=true)
|
3
3
|
|
4
4
|
## Description
|
5
|
-
A gem with a temporary stopgap workaround for MRI Ruby versions 2.2.7, 2.3.4, 2.4.1 for the bug https://bugs.ruby-lang.org/issues/13632 until the proper fix gets backported.
|
6
|
-
No other
|
5
|
+
A gem with a temporary stopgap workaround for MRI Ruby versions 2.2.7, 2.2.8, 2.3.4, 2.4.1 for the bug https://bugs.ruby-lang.org/issues/13632 until the proper fix gets backported.
|
6
|
+
No other versions besides those 4 are affected.
|
7
7
|
The mentioned versions are currently most recent ones.
|
8
8
|
|
9
|
-
##
|
9
|
+
## How does this bug look?
|
10
|
+
You're getting a similar exception erratically in a presence of many threads:
|
10
11
|
```ruby
|
11
|
-
|
12
|
-
|
12
|
+
Traceback (most recent call last):
|
13
|
+
1: from test2.rb:9:in `block (2 levels) in <main>'
|
14
|
+
test2.rb:9:in `sysopen': stream closed in another thread (IOError)
|
13
15
|
```
|
14
16
|
|
15
|
-
##
|
16
|
-
|
17
|
+
## Installation and usage
|
18
|
+
In Gemfile:
|
19
|
+
```ruby
|
20
|
+
if %w(2.2.7 2.2.8 2.3.4 2.4.1).include? RUBY_VERSION
|
21
|
+
gem "stopgap_13632", "~> 1.0", :platforms => ["mri", "mingw", "x64_mingw"]
|
22
|
+
end
|
23
|
+
|
24
|
+
```
|
25
|
+
Don't forget to require it:
|
26
|
+
```
|
27
|
+
require 'stopgap_13632'
|
28
|
+
```
|
29
|
+
And when an "IOError: stream closed" happens in a thread, accessing a busy IO, catch it and call the following method:
|
17
30
|
```
|
18
31
|
rescue IOError
|
19
32
|
Thread.current.purge_interrupt_queue
|
@@ -4,7 +4,7 @@ extension_name = 'stopgap_13632'
|
|
4
4
|
|
5
5
|
dir_config(extension_name)
|
6
6
|
|
7
|
-
BROKEN_VERSIONS = %w(2.2.7 2.3.4 2.4.1)
|
7
|
+
BROKEN_VERSIONS = %w(2.2.7 2.2.8 2.3.4 2.4.1)
|
8
8
|
if (BROKEN_VERSIONS.include? RUBY_VERSION)
|
9
9
|
$defs << '-DBROKEN_RUBY'
|
10
10
|
$defs << "-DVERSION_#{RUBY_VERSION.gsub('.', '_')}"
|
@@ -43,7 +43,7 @@ typedef struct half_thread {
|
|
43
43
|
void *top_self;
|
44
44
|
void *top_wrapper;
|
45
45
|
#ifndef VERSION_2_4_1
|
46
|
-
|
46
|
+
void *base_block;
|
47
47
|
#endif
|
48
48
|
void *root_lep;
|
49
49
|
void *root_svar;
|
@@ -58,7 +58,7 @@ typedef struct half_thread {
|
|
58
58
|
void *interrupt_event;
|
59
59
|
#elif defined(HAVE_PTHREAD_H)
|
60
60
|
void *ubf_list1_or_signal_thread_list;
|
61
|
-
#
|
61
|
+
#if defined(VERSION_2_3_4) && defined(VERSION_2_4_1)
|
62
62
|
void *ubf_list2;
|
63
63
|
#endif
|
64
64
|
pthread_cond_t cond;
|
data/stopgap_13632.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'stopgap_13632'
|
3
|
-
s.version = '1.0
|
3
|
+
s.version = '1.1.0'
|
4
4
|
s.authors = ['Nikolay Vashchenko']
|
5
|
-
s.description = 'Temporary stopgap workaround for MRI Ruby versions 2.2.7, 2.3.4, 2.4.1 for the bug https://bugs.ruby-lang.org/issues/13632 until it gets backported'
|
5
|
+
s.description = 'Temporary stopgap workaround for MRI Ruby versions 2.2.7, 2.2.8, 2.3.4, 2.4.1 for the bug https://bugs.ruby-lang.org/issues/13632 until it gets backported'
|
6
6
|
s.summary = 'Temporary solution for https://bugs.ruby-lang.org/issues/13632'
|
7
7
|
s.email = 'sir.nickolas@gmail.com'
|
8
8
|
s.extensions = ['ext/stopgap_13632/extconf.rb']
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stopgap_13632
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikolay Vashchenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|
@@ -38,8 +38,8 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '5.8'
|
41
|
-
description: Temporary stopgap workaround for MRI Ruby versions 2.2.7, 2.
|
42
|
-
for the bug https://bugs.ruby-lang.org/issues/13632 until it gets backported
|
41
|
+
description: Temporary stopgap workaround for MRI Ruby versions 2.2.7, 2.2.8, 2.3.4,
|
42
|
+
2.4.1 for the bug https://bugs.ruby-lang.org/issues/13632 until it gets backported
|
43
43
|
email: sir.nickolas@gmail.com
|
44
44
|
executables: []
|
45
45
|
extensions:
|
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
81
|
version: '0'
|
82
82
|
requirements: []
|
83
83
|
rubyforge_project:
|
84
|
-
rubygems_version: 2.
|
84
|
+
rubygems_version: 2.4.5.3
|
85
85
|
signing_key:
|
86
86
|
specification_version: 4
|
87
87
|
summary: Temporary solution for https://bugs.ruby-lang.org/issues/13632
|