realm-swift
realm-swift copied to clipboard
Exception with error: "Cannot schedule async transaction. Make sure you are running from inside a run loop."
Problem
When trying to perform an async write from within a thread without a run-loop, which is a common situation when performing an async write in a Task, an exception happens with the following error:
Cannot schedule async transaction. Make sure you are running from inside a run loop.
- This is missing from the documentation
- Is this limitation going to be lifted in the future?
Solution
No response
How important is this improvement for you?
Would be a major improvement
Hi @theoks, Thank you for the input. I'll discuss that with the team
Any news on this? This is blocking me too right now
Any news?
Any update?
Hi @Dhaval3110 we are working on a better experience with async/await operations, I'll post any updates to this issue, or follow our release notes to check for changes.
@dianaafanador3 thank you for update
Any update on this please?
🙄
Any update?
Any update?
This is an ongoing project at the moment, we've been improving concurrency support in our last releases, but there some things which are still on the works. We'll let you know when this is working correctly.
Looking forward to this
🙄
any update?
any update?
🙄
Current update is that we are enabling Actor confined Realm's in the near future. I know it is not exactly what is being asked for here, but technically accomplishes the same end result. Once a Realm is confined to the Actor, you will be able to do asyncWrites on it, and we/the swift concurrency runtime will handle the rest.