fibre 0.9.9 → 0.9.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fibre/core_ext/fiber.rb +1 -1
- data/lib/fibre/fiber_error.rb +15 -13
- data/lib/fibre/fiber_pool.rb +1 -1
- data/lib/fibre/version.rb +1 -1
- data/spec/fibre_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 633dd9a0b26627425b640e012e692379c06f561b
|
4
|
+
data.tar.gz: 5ab441c8bf6430561201b853188922658fd15cb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eabdca5d1648fb3d31c20497b02616cf63fefdf5c6dcb834935d1579355d01808550f6bbbd80d132f05b9dbef6da72d07559d29e8b839c4e549c5a39498e07cb
|
7
|
+
data.tar.gz: d3ede9823aa33c585841021b2e85c517bd5f7b9c24aa2ba10c8dba72097b4986a3e0d2bbbbf3eef9120e8a9049fd0b913d5830c7907587f910d01ef005752262
|
data/lib/fibre/core_ext/fiber.rb
CHANGED
data/lib/fibre/fiber_error.rb
CHANGED
@@ -1,18 +1,20 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
module Fibre
|
2
|
+
class FiberError < StandardError
|
3
|
+
attr_accessor :parent
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
def initialize parent = $!
|
6
|
+
@parent = parent
|
7
|
+
super(parent && parent.to_s)
|
8
|
+
end
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
def set_backtrace backtrace
|
11
|
+
bt = backtrace
|
12
|
+
if parent
|
13
|
+
bt = parent.backtrace
|
14
|
+
bt << "<<< parent fiber: #{parent.class.name}: #{parent}"
|
15
|
+
bt.concat backtrace
|
16
|
+
end
|
17
|
+
super bt
|
15
18
|
end
|
16
|
-
super bt
|
17
19
|
end
|
18
20
|
end
|
data/lib/fibre/fiber_pool.rb
CHANGED
data/lib/fibre/version.rb
CHANGED
data/spec/fibre_spec.rb
CHANGED
@@ -117,14 +117,14 @@ describe Fibre do
|
|
117
117
|
Fibre.pool.checkout do
|
118
118
|
raise "test"
|
119
119
|
end
|
120
|
-
}.to raise_error FiberError
|
120
|
+
}.to raise_error Fibre::FiberError
|
121
121
|
end
|
122
122
|
|
123
123
|
it "should sync with exception" do
|
124
124
|
expect {
|
125
125
|
op = FibreTestOperationWithException.new(4)
|
126
126
|
op.sync
|
127
|
-
}.to raise_error FiberError
|
127
|
+
}.to raise_error Fibre::FiberError
|
128
128
|
end
|
129
129
|
|
130
130
|
it "should sync array (scoping test)" do
|