3 ms·
I don't think its so easy. Go goes a bit too far and makes the scheduling pre-emptive which can make targeting a specific thread (like a UI thread) harder. I
by jayd16 5y ago
I don't think its so easy. Go goes a bit too far and makes the scheduling pre-emptive which can make targeting a specific thread (like a UI thread) harder.
I think an ideal language would need to support cooperative threading and binding to specific thread contexts.
- metaltyphoon 5y agoDon’t know much but i thought Kotlin did this.
- jayd16 5y agoKotlin does seem to do it well although Kotlin functions are still considered colored.
- yencabulator 5y agoYou can make goroutine == OS thread with a single function call, where it matters: https://pkg.go.dev/runtime#LockOSThread https://pkg.go.dev/runtime#LockOSThread