Permalink
Browse files

Minor fixes

  • Loading branch information...
1 parent eb81fff commit 456980eef4815ccc1c0161644fc23469cb92a505 @pitr-ch pitr-ch committed Dec 24, 2016
View
@@ -136,6 +136,8 @@ be obeyed though. Features developed in `concurrent-ruby-edge` are expected to m
*Why are these not in core?*
+- **Promises Framework** - They are being finalized to be able to be moved to core. They'll deprecate old
+ implementation.
- **Actor** - Partial documentation and tests; depends on new future/promise framework; stability is good.
- **Channel** - Brand new implementation; partial documentation and tests; stability is good.
- **LazyRegister** - Missing documentation and tests.
@@ -9,6 +9,7 @@
require 'concurrent/edge/atomic_markable_reference'
require 'concurrent/edge/lock_free_linked_set'
require 'concurrent/edge/lock_free_queue'
+require 'concurrent/edge/lock_free_stack'
require 'concurrent/edge/promises'
require 'concurrent/edge/cancellation'
@@ -11,7 +11,7 @@ module Concurrent
# Creates a thread local variable.
#
# @param [Object] default the default value when otherwise unset
- # @param [Proc] block Optional block that gets called to obtain the
+ # @param [Proc] default_block Optional block that gets called to obtain the
# default value for each thread
# @!macro [new] thread_local_var_method_get
@@ -72,28 +72,28 @@ module Concurrent
# the current thread will ever see that change.
#
# @!macro thread_safe_variable_comparison
- #
+ #
# @example
# v = ThreadLocalVar.new(14)
# v.value #=> 14
# v.value = 2
# v.value #=> 2
- #
+ #
# @example
# v = ThreadLocalVar.new(14)
- #
+ #
# t1 = Thread.new do
# v.value #=> 14
# v.value = 1
# v.value #=> 1
# end
- #
+ #
# t2 = Thread.new do
# v.value #=> 14
# v.value = 2
# v.value #=> 2
# end
- #
+ #
# v.value #=> 14
#
# @see https://docs.oracle.com/javase/7/docs/api/java/lang/ThreadLocal.html Java ThreadLocal
@@ -1 +1,2 @@
-require 'concurrent/atomic_reference/mutex_atomic'
+require 'atomic'
+require 'concurrent/atomic_reference/rbx'
@@ -229,7 +229,7 @@ def schedule(intended_time, *args, &task)
# @param [Numeric, Time] intended_time `Numeric` means to run in `intended_time` seconds.
# `Time` means to run on `intended_time`.
def schedule_on(default_executor, intended_time, *args, &task)
- ScheduledPromise.new(default_executor, intended_time).future.then(*args, &task)
+ ScheduledPromise.new(default_executor, intended_time).event.chain(*args, &task)
end
# @!macro promises.shortcut.on
@@ -30,6 +30,7 @@ def #{name}=(value)
def full_memory_barrier
# Rubinius instance variables are not volatile so we need to insert barrier
+ # TODO (pitr 26-Nov-2015): check comments like ^
Rubinius.memory_barrier
end
end

0 comments on commit 456980e

Please sign in to comment.