concurrent 0.2.1 → 0.2.2
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.
- data/Rakefile +1 -1
- data/ext/concurrent/futures/futures.c +2 -1
- data/lib/concurrent/futures.rb +2 -4
- data/lib/concurrent/futures.so +0 -0
- metadata +3 -2
data/Rakefile
CHANGED
@@ -112,10 +112,11 @@ static VALUE rb_thunk_method_missing(int argc, VALUE *argv, VALUE self) {
|
|
112
112
|
|
113
113
|
if ( CLASS_OF(self) == cThunk ) {
|
114
114
|
if ( name == inspect_id && argc == 1 ) {
|
115
|
+
VALUE source;
|
115
116
|
Thunk *thunk;
|
116
117
|
Data_Get_Struct(self, Thunk, thunk);
|
117
118
|
rb_thread_critical = 1;
|
118
|
-
|
119
|
+
source = thunk->source;
|
119
120
|
rb_thread_critical = 0;
|
120
121
|
if (RTEST(source)) {
|
121
122
|
return rb_str_plus(rb_str_plus(rb_str_new2("#<Thunk "), rb_funcall(source, inspect_id, 0)), rb_str_new2(">"));
|
data/lib/concurrent/futures.rb
CHANGED
@@ -100,10 +100,8 @@ class Lazy
|
|
100
100
|
def value
|
101
101
|
@lock.synchronize do
|
102
102
|
if @block
|
103
|
-
|
104
|
-
|
105
|
-
@block = nil
|
106
|
-
end
|
103
|
+
@value = Thunk.new Thread.new( &block )
|
104
|
+
@block = nil
|
107
105
|
end
|
108
106
|
@value
|
109
107
|
end
|
Binary file
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: concurrent
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.2.
|
7
|
-
date: 2007-05-
|
6
|
+
version: 0.2.2
|
7
|
+
date: 2007-05-31 00:00:00 -04:00
|
8
8
|
summary: Omnibus concurrency library for Ruby
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -43,6 +43,7 @@ files:
|
|
43
43
|
- lib/concurrent/actors/actor.rb
|
44
44
|
- lib/concurrent/actors/mailbox.rb
|
45
45
|
- lib/concurrent/actors/case.rb
|
46
|
+
- lib/concurrent/futures.so
|
46
47
|
test_files:
|
47
48
|
- test/test_all.rb
|
48
49
|
rdoc_options: []
|