Merge "Don't run onWrite on main thread and handle cancel"