I guess this should be documented that CreateJVM and AttachCurrentThread functions call, runtime.LockOSThread() and that it's the callers responsibility to call runtime.UnlockOSThread().
For CreateJVM you probably are not going to call UnlockOSThread().
For AttachCurrentThread if it's a long lived goroutine calling UnlockOSThread() is needed, but usually it's a short lived goroutine so it doesn't matter that much.
I guess this should be documented that CreateJVM and AttachCurrentThread functions call, runtime.LockOSThread() and that it's the callers responsibility to call runtime.UnlockOSThread().
For CreateJVM you probably are not going to call UnlockOSThread().
For AttachCurrentThread if it's a long lived goroutine calling UnlockOSThread() is needed, but usually it's a short lived goroutine so it doesn't matter that much.