- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for Chan (0.12 sec)
-
misc/cgo/gmp/fib.go
// concurrency, just threads and synchronization // and foreign code on multiple pthreads. package main import ( big "." "runtime" ) 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)
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Apr 10 22:32:35 GMT 2023 - 919 bytes - Viewed (0) -
src/cmd/api/testdata/src/pkg/p1/p1.go
return now } var x = &S{ Public: nil, private: nil, PublicTime: Now(), } var parenExpr = (1 + 5) var funcLit = func() {} var m map[string]int var chanVar chan int var ifaceVar any = 5 var assertVar = ifaceVar.(int) var indexVar = m["foo"] var Byte byte var ByteFunc func(byte) rune type ByteStruct struct { B byte R rune
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Dec 02 16:29:41 GMT 2022 - 3.3K bytes - Viewed (0) -
src/cmd/cgo/internal/test/cgo_thread_lock.go
"testing" "time" ) //export Gosched func Gosched() { runtime.Gosched() } func init() { testThreadLockFunc = testThreadLock } func testThreadLock(t *testing.T) { stop := make(chan int) go func() { // We need the G continue running, // so the M has a chance to run this G. for { select { case <-stop: return case <-time.After(time.Millisecond * 100): } }
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Thu May 18 16:55:07 GMT 2023 - 939 bytes - Viewed (0) -
src/cmd/cgo/internal/test/gcc68255/a.go
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Test that it's OK to have C code that does nothing other than // initialize a global variable. This used to fail with gccgo. package gcc68255 /* #include "c.h" */ import "C" func F() bool { return C.v != nil
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri May 12 12:00:02 GMT 2023 - 378 bytes - Viewed (0) -
src/cmd/cgo/internal/test/buildid_linux.go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package cgotest // Test that we have no more than one build ID. In the past we used // to generate a separate build ID for each package using cgo, and the // linker concatenated them all. We don't want that--we only want // one. import ( "bytes" "debug/elf" "os" "testing"
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri May 12 12:00:02 GMT 2023 - 1.7K bytes - Viewed (0) -
src/cmd/cgo/internal/test/issue1435.go
} return nil } // test1435 test 9 glibc implemented setuid/gid syscall functions are // mapped. This test is a slightly more expansive test than that of // src/syscall/syscall_linux_test.go:TestSetuidEtc() insofar as it // launches concurrent threads from C code via CGo and validates that // they are subject to the system calls being tested. For the actual
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Jul 28 21:31:41 GMT 2023 - 7.5K bytes - Viewed (0) -
src/cmd/cgo/internal/test/issue27340/a.go
// In separate directory to isolate #pragma GCC diagnostic. package issue27340 // We use the #pragma to avoid a compiler warning about incompatible // pointer types, because we generate code passing a struct ptr rather // than using the typedef. This warning is expected and does not break // a normal build. // We can only disable -Wincompatible-pointer-types starting with GCC 5. // #if __GNU_MAJOR__ >= 5 //
Go - Registered: Tue Mar 26 11:13:08 GMT 2024 - Last Modified: Fri May 12 12:00:02 GMT 2023 - 1.2K bytes - Viewed (0) -
src/bytes/compare_test.go
// difference that for some j, a[j]>b[j] and a[j+1]<b[j+1]. If the implementation // compares large chunks with wrong endianness, it gets wrong result. // no vector register is larger than 512 bytes for now const maxLength = 512 a := make([]byte, maxLength) b := make([]byte, maxLength) // randomish but deterministic data. No 0 or 255. for i := 0; i < maxLength; i++ { a[i] = byte(1 + 31*i%254)
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Jul 13 23:11:42 GMT 2023 - 6.8K bytes - Viewed (0)