Hey folks,
Quickjs appears to have some thread-local memory, so I'm use runtime.LockOSThread() to make sure that the goroutine is always placed on the same thread. I'm using a worker pattern to distribute load.
The problem I'm running into is that sometimes worker's goroutines get scheduled (and then locked) to the same thread, effectively serializing the computation. This seems random and causes a loss in parallelism since these goroutines will remain on the same thread through their lifetime.
Are there any workarounds with this issue?
Thanks!
Matt