Skip to content

Commit 456980e

Browse files
committed
Minor fixes
1 parent eb81fff commit 456980e

File tree

6 files changed

+13
-8
lines changed

6 files changed

+13
-8
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ be obeyed though. Features developed in `concurrent-ruby-edge` are expected to m
136136

137137
*Why are these not in core?*
138138

139+
- **Promises Framework** - They are being finalized to be able to be moved to core. They'll deprecate old
140+
implementation.
139141
- **Actor** - Partial documentation and tests; depends on new future/promise framework; stability is good.
140142
- **Channel** - Brand new implementation; partial documentation and tests; stability is good.
141143
- **LazyRegister** - Missing documentation and tests.

lib/concurrent-edge.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
require 'concurrent/edge/atomic_markable_reference'
1010
require 'concurrent/edge/lock_free_linked_set'
1111
require 'concurrent/edge/lock_free_queue'
12+
require 'concurrent/edge/lock_free_stack'
1213

1314
require 'concurrent/edge/promises'
1415
require 'concurrent/edge/cancellation'

lib/concurrent/atomic/thread_local_var.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module Concurrent
1111
# Creates a thread local variable.
1212
#
1313
# @param [Object] default the default value when otherwise unset
14-
# @param [Proc] block Optional block that gets called to obtain the
14+
# @param [Proc] default_block Optional block that gets called to obtain the
1515
# default value for each thread
1616

1717
# @!macro [new] thread_local_var_method_get
@@ -72,28 +72,28 @@ module Concurrent
7272
# the current thread will ever see that change.
7373
#
7474
# @!macro thread_safe_variable_comparison
75-
#
75+
#
7676
# @example
7777
# v = ThreadLocalVar.new(14)
7878
# v.value #=> 14
7979
# v.value = 2
8080
# v.value #=> 2
81-
#
81+
#
8282
# @example
8383
# v = ThreadLocalVar.new(14)
84-
#
84+
#
8585
# t1 = Thread.new do
8686
# v.value #=> 14
8787
# v.value = 1
8888
# v.value #=> 1
8989
# end
90-
#
90+
#
9191
# t2 = Thread.new do
9292
# v.value #=> 14
9393
# v.value = 2
9494
# v.value #=> 2
9595
# end
96-
#
96+
#
9797
# v.value #=> 14
9898
#
9999
# @see https://docs.oracle.com/javase/7/docs/api/java/lang/ThreadLocal.html Java ThreadLocal
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
require 'concurrent/atomic_reference/mutex_atomic'
1+
require 'atomic'
2+
require 'concurrent/atomic_reference/rbx'

lib/concurrent/edge/promises.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def schedule(intended_time, *args, &task)
229229
# @param [Numeric, Time] intended_time `Numeric` means to run in `intended_time` seconds.
230230
# `Time` means to run on `intended_time`.
231231
def schedule_on(default_executor, intended_time, *args, &task)
232-
ScheduledPromise.new(default_executor, intended_time).future.then(*args, &task)
232+
ScheduledPromise.new(default_executor, intended_time).event.chain(*args, &task)
233233
end
234234

235235
# @!macro promises.shortcut.on

lib/concurrent/synchronization/rbx_object.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def #{name}=(value)
3030

3131
def full_memory_barrier
3232
# Rubinius instance variables are not volatile so we need to insert barrier
33+
# TODO (pitr 26-Nov-2015): check comments like ^
3334
Rubinius.memory_barrier
3435
end
3536
end

0 commit comments

Comments
 (0)