Skip to content

Commit ba19895

Browse files
committed
BufferedChannel now uses ConditionVariable instead of Condition.
1 parent dc4030f commit ba19895

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/concurrent/channel/buffered_channel.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
require 'concurrent/atomic/condition'
21
require 'concurrent/channel/waitable_list'
32

43
module Concurrent
54
class BufferedChannel
65

76
def initialize(size)
87
@mutex = Mutex.new
9-
@condition = Condition.new
10-
@buffer_condition = Condition.new
8+
@condition = ConditionVariable.new
9+
@buffer_condition = ConditionVariable.new
1110

1211
@probe_set = WaitableList.new
1312
@buffer = RingBuffer.new(size)

0 commit comments

Comments
 (0)