- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for LockOSThread (0.09 sec)
-
misc/cgo/gmp/fib.go
) func fibber(c chan *big.Int, out chan string, n int64) { // Keep the fibbers in dedicated operating system // threads, so that this program tests coordination // between pthreads and not just goroutines. runtime.LockOSThread() i := big.NewInt(n) if n == 0 { c <- i } for { j := <-c out <- j.String() i.Add(i, j) c <- i } } func main() { c := make(chan *big.Int)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Apr 10 22:32:35 UTC 2023 - 919 bytes - Viewed (0) -
cni/pkg/nodeagent/netns_linux.go
// leave the thread locked to die without a risk of the current thread // left lingering with incorrect namespace. var innerError error go func() { defer wg.Done() runtime.LockOSThread() innerError = containedCall() }() wg.Wait() return innerError
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Jan 31 10:05:36 UTC 2024 - 2.7K bytes - Viewed (0)