can <deferred> value be shared between different s...
# coroutines
m
can deferred value be shared between different scopes? Create builder in one, then start and await in another.
o
I don't see why not
👍 2
as stated:
All functions on this interface and on all interfaces derived from it are thread-safe and can be safely invoked from concurrent coroutines without external synchronization.
m
thanks for clarification, that's what I was thinking but I wasn't sure because it doesn't say scope per se
z
The concept of "coroutine scope" is just a convention for job hierarchies, along with some types and syntax to make it easy. In general, a suspend function (such as Deferred.await) can be called by any coroutine, regardless of Job, and any limitations on this should be very clearly documented. No such limitations exist on Deferred.
👍 1