I've been working on kotlinx-gtk to calm my mind, ...
# coroutines
c
I've been working on kotlinx-gtk to calm my mind, and I created a few tests relating to concurrency and such. https://github.com/Doomsdayrs/kotlinx-gtk/blob/main/src/nativeTest/kotlin/Main.kt Refer to the
ViewModel
I have created in the file above,
Copy code
startSharedDataTest	-> expected execution 
stopSharedDataTest	-> kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for CancellableContinuation(Shareable[used]){Completed}@1399e08
Second is related to UI execution via dialog tests:
Copy code
Default						->	x11 MT needed
Main 						-> kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for CancellableContinuation(Shareable[used]){Completed}@82c0c8
Unconfined 					-> Expected event
Unconfinedx2 				-> Expected event
Unconfined via supervisor 	-> Expected event
IO 							-> x11 MT needed
UI 							-> x11 MT needed (need to have execute on the main loop for a gtk application, not on a newSingleThreadContext )
Empty 						-> x11 MT needed
Can someone explain to me: What is happening with the
sharedDataTest
Why
Main
context leads to a fatal error How would I create a context that executes on the main loop for GTK? (I know android has their own dispatches that let you run on the actual UI thread of android)