gildor
06/04/2018, 6:31 AMvoddan
06/04/2018, 6:51 AMVsevolod Tolstopyatov [JB]
06/04/2018, 7:19 AM+
operator doesn’t copy all its arguments, it concatenates them, given you tree-like structurevoddan
06/04/2018, 7:26 AMVsevolod Tolstopyatov [JB]
06/04/2018, 7:32 AMCommonPool
and CoroutineName
.
It doesn’t matter, what hides behind CommonPool
, threads count or actual threadsvoddan
06/04/2018, 7:37 AMVsevolod Tolstopyatov [JB]
06/04/2018, 7:42 AMCoroutineContext
is still a map with key-value access. What may puzzle you is the fact that this map is immutable.
For immutable maps there is no difference whether +
concatenates maps as a tree or actually copies all elements, it’s an implementation detail. E.g. Scala scala.collection.immutable.Map
behaves exactly the same way as CoroutineContext
.
Also note, that there is no such standard container, which provides deep copy of elements.
E.g. if you put CommonPool
into hash map and then call copy
on it, do you expect it to do deep copy of CommonPool
?voddan
06/04/2018, 7:50 AMdo you expect it to do deep copy ofOk that makes sense when I think about it?CommonPool
voddan
06/04/2018, 7:53 AMVsevolod Tolstopyatov [JB]
06/04/2018, 8:43 AMkotlinx.coroutines
dave08
06/04/2018, 3:37 PMdave08
06/04/2018, 3:39 PMVsevolod Tolstopyatov [JB]
06/04/2018, 4:41 PMdave08
06/04/2018, 4:43 PMdave08
06/04/2018, 4:46 PMdave08
06/04/2018, 4:48 PMdave08
06/04/2018, 4:49 PMgildor
06/05/2018, 12:43 AMdave08
06/05/2018, 1:59 AMgildor
06/05/2018, 2:01 AMgildor
06/05/2018, 2:03 AMgildor
06/05/2018, 2:04 AMI didn’t mean docs about combining context@dave08 But original thread started as problem with understanding of context combining
gildor
06/05/2018, 2:05 AMthe last few days I spent lots of time with tests and coroutines hanging with no proper exceptions to let me kmow what happenedWhat is the reason of this problem? Maybe make sense to add this to docs to avoid future problems
gildor
06/05/2018, 2:05 AMdave08
06/05/2018, 2:11 AMdave08
06/05/2018, 2:14 AMgildor
06/05/2018, 2:18 AMgildor
06/05/2018, 2:22 AMdave08
06/05/2018, 2:24 AMgildor
06/05/2018, 2:25 AMdave08
06/05/2018, 2:26 AMdave08
06/05/2018, 2:27 AMgildor
06/05/2018, 2:28 AMgildor
06/05/2018, 2:30 AMgildor
06/05/2018, 2:40 AMasad.awadia
06/05/2018, 2:57 AMdave08
06/05/2018, 4:02 AMgildor
06/05/2018, 4:04 AMdave08
06/05/2018, 4:10 AMgildor
06/05/2018, 5:37 AM