From 3dc1e403ea9f4a63d32a268ff9e4f99dfe1c6e23 Mon Sep 17 00:00:00 2001 From: Dan Kegel Date: Sat, 26 Mar 2022 11:20:43 -0700 Subject: [PATCH] runtime: stub {Lock,Unlock}OSThread. Makes 1.18 happier on windows. --- src/runtime/runtime.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/runtime/runtime.go b/src/runtime/runtime.go index f22e2cdd..29ce0cfc 100644 --- a/src/runtime/runtime.go +++ b/src/runtime/runtime.go @@ -74,3 +74,14 @@ func nanotime() int64 { func os_sigpipe() { runtimePanic("too many writes on closed pipe") } + +// LockOSThread wires the calling goroutine to its current operating system thread. +// Stub for now +// Called by go1.18 standard library on windows, see https://github.com/golang/go/issues/49320 +func LockOSThread() { +} + +// UnlockOSThread undoes an earlier call to LockOSThread. +// Stub for now +func UnlockOSThread() { +}