Vsevolod Tolstopyatov

Results 342 comments of Vsevolod Tolstopyatov

Preliminary findings are that the problem is caused by `SuspendFunGun` implementation from Ktor

Here is the patch to make a reproducer from [https://github.com/michail-nikolaev/kotlin-coroutines-thread-local/](https://github.com/michail-nikolaev/kotlin-coroutines-thread-local/blob/master/test/SuspendFunctionGunTest.kt) work (NB: reproducer is non-deterministic and happen to break only under debugger due to its timing-sensitive nature) ``` Subject: [PATCH]...

Thanks! More deterministic repro: ``` val threadLocal = ThreadLocal() suspend fun main() { doSomeJob(1) } private suspend fun doSomeJob(id: Int) { check(threadLocal.get() == null) withContext(threadLocal.asContextElement("foo")) { withContext(Dispatchers.Default) { } println("$id...

I'm working on that, the ETA is 1.7.0-Beta|RC, the fix is unfortunately far from being trivial and can be basically boil down to #3253

A small update: there are two bugs: one in `kotlinx.coroutines` that affects only the code launched directly without `kotlinx.coroutines` (e.g. `startCoroutineUnintercepted`, `suspend fun main` etc.) and one in Ktor. The...

Thanks for the reminder, no updates yet. We'll see if it's manageable in the scope of 1.8.0

@LouisCAD structured-concurrency is for a specific (backwards-compatible) project that aims to solve all (most) of the labeled issues with a dedicated API layer. This one, unfortunately, is much more profound

It also crashes for me on the JVM. On Android, it's either timing (so `Ignored exception` is printed) or slightly different executor/dispatcher setup. The cause is straightforward -- there are...

True, we have to acknowledge that. >since there is no guarantee that dispatch doesn't throw The documentation (somewhat vaguely, though) states the following: >This method should generally be exception-safe. An...