Skip to content

Commit a724bcb

Browse files
committed
Removed all deprecated code (classes, methods, constants, etc.)
1 parent 0d449fb commit a724bcb

32 files changed

+46
-975
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
### Upcoming Release v1.0.0 (TBD)
2+
3+
* Removed all deprecated code (classes, methods, constants, etc.)
4+
* Updated Agent, MutexAtomic, and BufferedChannel to inherit from Synchronization::Object.
5+
16
## Current Release v0.9.1 (09 August 2015)
27

38
* Fixed a Rubiniux bug in synchronization object

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ require 'concurrent/tvar' # Concurrent::TVar
184184
require 'concurrent/actor' # Concurrent::Actor and supporting code
185185
require 'concurrent/edge/future' # new Future Framework
186186
require 'concurrent/agent' # Concurrent::Agent
187-
require 'concurrent/channel ' # Concurrent::Channel and supporting code
187+
require 'concurrent/channel' # Concurrent::Channel and supporting code
188188
```
189189

190190
If the library does not behave as expected, `Concurrent.use_stdlib_logger(Logger::DEBUG)` could help to reveal the problem.

lib/concurrent.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
require 'concurrent/atomics'
88
require 'concurrent/errors'
99
require 'concurrent/executors'
10-
require 'concurrent/utilities'
1110

1211
require 'concurrent/atomic/atomic_reference'
1312
require 'concurrent/atom'

lib/concurrent/agent.rb

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
require 'concurrent/concern/observable'
55
require 'concurrent/concern/logging'
66
require 'concurrent/executor/executor'
7-
require 'concurrent/concern/deprecation'
87

98
module Concurrent
109

@@ -85,7 +84,6 @@ class Agent
8584
include Concern::Dereferenceable
8685
include Concern::Observable
8786
include Concern::Logging
88-
include Concern::Deprecation
8987

9088
attr_reader :timeout, :io_executor, :fast_executor
9189

@@ -179,30 +177,13 @@ def post(&block)
179177
# Update the current value with the result of the given block fast,
180178
# block can do blocking calls
181179
#
182-
# @param [Fixnum, nil] timeout [DEPRECATED] maximum number of seconds before an update is cancelled
183-
#
184180
# @yield the fast to be performed with the current value in order to calculate
185181
# the new value
186182
# @yieldparam [Object] value the current value
187183
# @yieldreturn [Object] the new value
188184
# @return [true, nil] nil when no block is given
189-
def post_off(timeout = nil, &block)
190-
task = if timeout
191-
deprecated 'post_off with option timeout options is deprecated and will be removed'
192-
lambda do |value|
193-
future = Future.execute do
194-
block.call(value)
195-
end
196-
if future.wait(timeout)
197-
future.value!
198-
else
199-
raise Concurrent::TimeoutError
200-
end
201-
end
202-
else
203-
block
204-
end
205-
post_on(@io_executor, &task)
185+
def post_off(&block)
186+
post_on(@io_executor, &block)
206187
end
207188

208189
# Update the current value with the result of the given block fast,

lib/concurrent/async.rb

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
require 'concurrent/ivar'
66
require 'concurrent/executor/immediate_executor'
77
require 'concurrent/executor/serialized_execution'
8-
require 'concurrent/concern/deprecation'
98

109
module Concurrent
1110

@@ -248,22 +247,6 @@ def executor=(executor)
248247
raise ArgumentError.new('executor has already been set')
249248
end
250249

251-
# Initialize the internal serializer and other stnchronization mechanisms.
252-
#
253-
# @note This method *must* be called immediately upon object construction.
254-
# This is the only way thread-safe initialization can be guaranteed.
255-
#
256-
# @raise [Concurrent::InitializationError] when called more than once
257-
#
258-
# @!visibility private
259-
# @deprecated
260-
def init_mutex
261-
deprecated 'mutex synchronization now happens automatically'
262-
init_synchronization
263-
rescue InitializationError
264-
# suppress
265-
end
266-
267250
private
268251

269252
# Initialize the internal serializer and other stnchronization mechanisms.

lib/concurrent/atomic/atomic_reference.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,3 @@ class Concurrent::AtomicReference < Concurrent::CAtomicReference
4040
class Concurrent::AtomicReference < Concurrent::MutexAtomicReference
4141
end
4242
end
43-
44-
module Concurrent
45-
46-
# @see Concurrent::AtomicReference
47-
# @deprecated Use Concurrent::AtomicReference instead.
48-
Atomic = AtomicReference
49-
end

lib/concurrent/atomic/condition.rb

Lines changed: 0 additions & 78 deletions
This file was deleted.

lib/concurrent/atomics.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
require 'concurrent/atomic/atomic_reference'
7474
require 'concurrent/atomic/atomic_boolean'
7575
require 'concurrent/atomic/atomic_fixnum'
76-
require 'concurrent/atomic/condition'
7776
require 'concurrent/atomic/cyclic_barrier'
7877
require 'concurrent/atomic/count_down_latch'
7978
require 'concurrent/atomic/event'

lib/concurrent/concern/obligation.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33

44
require 'concurrent/atomic/event'
55
require 'concurrent/concern/dereferenceable'
6-
require 'concurrent/concern/deprecation'
76

87
module Concurrent
98
module Concern
109

1110
module Obligation
1211
include Concern::Dereferenceable
13-
include Concern::Deprecation
1412

1513
# Has the obligation been fulfilled?
1614
#
@@ -48,16 +46,6 @@ def complete?
4846
[:fulfilled, :rejected].include? state
4947
end
5048

51-
# Has the obligation completed processing?
52-
#
53-
# @return [Boolean]
54-
#
55-
# @deprecated
56-
def completed?
57-
deprecated_method 'completed?', 'complete?'
58-
complete?
59-
end
60-
6149
# Is the obligation still awaiting completion of processing?
6250
#
6351
# @return [Boolean]

0 commit comments

Comments
 (0)