 		}
 	}
 
-	public func observeSavedChanges(from other: NSManagedObjectContext) {
-		NotificationCenter.default()
-			.addObserver(self,
-			             selector: #selector(NSManagedObjectContext.handleExternalChanges(_:)),
-			             name: NSNotification.Name.NSManagedObjectContextDidSave,
-			             object: other)
-	}
-
-	public func stopObservingSavedChanges(from other: NSManagedObjectContext) {
-		NotificationCenter.default()
-			.removeObserver(self,
-			                name: NSNotification.Name.NSManagedObjectContextDidSave,
-			                object: other)
-	}
-
-	public func observeBatchChanges(from other: NSManagedObjectContext) {
-		let defaultCenter = NotificationCenter.default()
-
-		defaultCenter.addObserver(self,
-		                          selector: #selector(NSManagedObjectContext.handleExternalBatchUpdate(_:)),
-		                          name: didBatchUpdateNotification,
-		                          object: other)
-
-		defaultCenter.addObserver(self,
-		                          selector: #selector(NSManagedObjectContext.preprocessBatchDelete(_:)),
-		                          name: willBatchDeleteNotification,
-		                          object: other)
-	}
-
-	public func stopObservingBatchChanges(from other: NSManagedObjectContext) {
-		let defaultCenter = NotificationCenter.default()
-
-		defaultCenter.removeObserver(self,
-		                             name: NSNotification.Name(rawValue: willBatchDeleteNotification),
-		                             object: other)
-
-		defaultCenter.removeObserver(self,
-		                             name: NSNotification.Name(rawValue: didBatchUpdateNotification),
-		                             object: other)
+	@discardableResult
+	public func observeSavedChanges(from other: NSManagedObjectContext) -> Disposable {
+		return NotificationCenter.default
+			.rac_notifications(for: .NSManagedObjectContextDidSave, object: other)
+			.take(until: willDeinitProducer.zip(with: other.willDeinitProducer))
+			.startWithNext(handleExternalChanges(_:))
+	}
+
+	@discardableResult
+	public func observeBatchChanges(from other: NSManagedObjectContext) -> Disposable {
+		let disposable = CompositeDisposable()
+		let defaultCenter = NotificationCenter.default
+
+		disposable += defaultCenter
+			.rac_notifications(for: .didBatchUpdate, object: other)
+			.take(until: willDeinitProducer.zip(with: other.willDeinitProducer))
+			.startWithNext(handleExternalBatchUpdate(_:))
+
+		disposable += defaultCenter
+			.rac_notifications(for: .willBatchDelete, object: other)
+			.take(until: willDeinitProducer.zip(with: other.willDeinitProducer))
+			.startWithNext(preprocessBatchDelete(_:))
+
+		return disposable
 	}
 
 	/// Enqueue a block to the context.


	@objc private func preprocessBatchDelete(_ notification: Notification) {
		sync {
			guard let resultIDs = (notification as NSNotification).userInfo?[batchRequestResultIDArrayKey] as? [NSManagedObjectID] else {
				return
			}



		updateObjectsWith(objectIDs)

		NotificationCenter.default
			.post(name: .didBatchUpdate,
			      object: self,
						userInfo: [NSManagedObjectContext.batchRequestResultIDArrayKey: objectIDs])
	}

	/// Batch delete objects, and update other contexts asynchronously.
