Skip to content

Instantly share code, notes, and snippets.

package shortened_stack_trace
import kotlinx.coroutines.delay
suspend fun fun3() {
delay(100)
throw RuntimeException()
}
suspend fun fun2() {
@Anamorphosee
Anamorphosee / testLoomSeq.kt
Created January 27, 2023 13:43
loom sequence
@file:Suppress("JAVA_MODULE_DOES_NOT_EXPORT_PACKAGE")
import jdk.internal.vm.Continuation
import jdk.internal.vm.ContinuationScope
internal class Wrapper<T>(val value: T)
class SequenceScope<T>(
private val seq: Sequence<T>
) {
@Anamorphosee
Anamorphosee / testLoom.kt
Last active February 12, 2024 07:22
loom ui example
@file:Suppress("JAVA_MODULE_DOES_NOT_EXPORT_PACKAGE")
import jdk.internal.vm.Continuation
import jdk.internal.vm.ContinuationScope
import javax.swing.SwingUtilities
class UILoomScope(
private val continuationScope: ContinuationScope,
private val continuation: Continuation
) {