 			}
 		
 			return Promise {
-				let e: Event<T> = withLock(self.condition) {
-					while self.events.count < index {
-						self.condition.wait()
+				let e: Event<T> = withLock(self._condition) {
+					while self._events.count < index {
+						self._condition.wait()
 					}
 					
-					return self.events[index++]
+					return self._events[index++]
 				}
 				
 				if e.isTerminating {

	}
	
	func send(event: Event<T>) {
		withLock(self.condition) { () -> () in
			self.events.append(event)
			self.condition.broadcast()
		}
	}
}

import Foundation

@final class AsyncBuffer<T>: AsyncSequence<T> {
	let _condition = NSCondition()
	var _events: Event<T>[] = []
	
	init() {
		_condition.name = "com.github.RxSwift.Observable.AsyncBuffer"
		super.init(_generate)
	}

