 import Result
+
+private let outputQueue = { () -> dispatch_queue_t in
+	let queue = dispatch_queue_create("org.carthage.carthage.outputQueue", DISPATCH_QUEUE_SERIAL)
+	dispatch_set_target_queue(queue, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0))
+
+	atexit_b {
+		dispatch_barrier_sync(queue) {}
+	}
+
+	return queue
+	}()
+
+/// A thread-safe version of Swift's standard println().
+internal func println() {
+	dispatch_async(outputQueue) {
+		Swift.println()
+	}
+}
+
+/// A thread-safe version of Swift's standard println().
+internal func println<T>(object: T) {
+	dispatch_async(outputQueue) {
+		Swift.println(object)
+	}
+}
+
+/// A thread-safe version of Swift's standard print().
+internal func print<T>(object: T) {
+	dispatch_async(outputQueue) {
+		Swift.print(object)
+	}
+}
+
+
 
 /// A SignalProducer creates Signals that can produce values of type `T` and/or
 /// error out with errors of type `E`. If no errors should be possible, NoError


			var token: RemovalToken?
			observers.modify { (var observers) in
				token = observers?.insert(observer)
				return observers
			}

			for event in events {
				observer.put(event)
			}

			if let liveObservers = oldObservers {
				lock.lock()

				ReactiveCocoa.println("\(ObjectIdentifier(lock).hashValue) bufferingObserver() put()")
				if event.isTerminating {
					terminationEvent = event
				} else {
