- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for pipe1 (0.04 sec)
-
src/internal/trace/testdata/testprog/wait-on-pipe.go
import ( "log" "os" "runtime/trace" "syscall" "time" ) func main() { // Create a pipe to block on. var p [2]int if err := syscall.Pipe(p[:]); err != nil { log.Fatalf("failed to create pipe: %v", err) } rfd, wfd := p[0], p[1] // Create a goroutine that blocks on the pipe. done := make(chan struct{}) go func() { var data [1]byte _, err := syscall.Read(rfd, data[:])
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 1.6K bytes - Viewed (0) -
pkg/kubelet/util/util_windows.go
} // windows pipes are expected to use forward slashes: https://learn.microsoft.com/windows/win32/ipc/pipe-names // so using `url` like we do on unix gives us unclear benefits - see https://github.com/kubernetes/kubernetes/issues/78628 // So we just construct the path from scratch. // Format: \\ServerName\pipe\PipeName
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 14 08:58:18 UTC 2024 - 3K bytes - Viewed (0) -
src/internal/trace/testdata/testprog/stress-start-stop.go
outerDone <- true }() var wg sync.WaitGroup done := make(chan bool) wg.Add(1) go func() { <-done wg.Done() }() rp, wp, err := os.Pipe() if err != nil { log.Fatalf("failed to create pipe: %v", err) return } defer func() { rp.Close() wp.Close() }() wg.Add(1) go func() { var tmp [1]byte rp.Read(tmp[:]) <-done wg.Done()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 2.7K bytes - Viewed (0) -
src/internal/trace/testdata/testprog/stress.go
// Create a goroutine blocked before tracing. wg.Add(1) go func() { <-done wg.Done() }() // Create a goroutine blocked in syscall before tracing. rp, wp, err := os.Pipe() if err != nil { log.Fatalf("failed to create pipe: %v", err) } defer func() { rp.Close() wp.Close() }() wg.Add(1) go func() { var tmp [1]byte rp.Read(tmp[:]) <-done wg.Done() }()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 2.5K bytes - Viewed (0) -
src/io/pipe_test.go
} if err = r.Close(); err != nil { t.Errorf("r.Close: %v", err) } } } // Test close on Read side during Read. func TestPipeReadClose2(t *testing.T) { c := make(chan int, 1) r, _ := Pipe() go delayClose(t, r, c, pipeTest{}) n, err := r.Read(make([]byte, 64)) <-c if n != 0 || err != ErrClosedPipe {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 9K bytes - Viewed (0) -
src/os/exec_test.go
testenv.MustHaveGoBuild(t) t.Parallel() r, w, err := os.Pipe() if err != nil { t.Fatalf("Pipe() got err %v, want nil", err) } defer r.Close() defer w.Close() p, err := os.StartProcess(testenv.GoToolPath(t), []string{"go"}, &os.ProcAttr{ // N.B. On Windows, StartProcess requires exactly 3 Files. Pass // in a dummy pipe to avoid irrelevant output on the test stdout. Files: []*os.File{r, w, w}, })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 11 18:08:44 UTC 2024 - 1.8K bytes - Viewed (0) -
src/runtime/debug/example_monitor_test.go
cmd := exec.Command(exe, "-test.run=ExampleSetCrashOutput_monitor") cmd.Env = append(os.Environ(), monitorVar+"=1") cmd.Stderr = os.Stderr cmd.Stdout = os.Stderr pipe, err := cmd.StdinPipe() if err != nil { log.Fatalf("StdinPipe: %v", err) } debug.SetCrashOutput(pipe.(*os.File), debug.CrashOptions{}) // (this conversion is safe) if err := cmd.Start(); err != nil { log.Fatalf("can't start monitor: %v", err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 15:19:04 UTC 2024 - 2.7K bytes - Viewed (0) -
cmd/bitrot-streaming.go
// Race condition is because of io.PipeWriter implementation. i.e consider the following // sequent of operations: // 1) pipe.Write() // 2) pipe.Close() // Now pipe.Close() can return before the data is read on the other end of the pipe and written to the disk // Hence an immediate Read() on the file can return incorrect data. if b.canClose != nil { b.canClose.Wait() }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed May 15 00:11:04 UTC 2024 - 6.1K bytes - Viewed (0) -
internal/ringbuffer/README.md
If you want to block when reading or writing, you must enable it: ```go rb := ringbuffer.New(1024).SetBlocking(true) ``` Enabling blocking will cause the ring buffer to behave like a buffered [io.Pipe](https://pkg.go.dev/io#Pipe). Regular Reads will block until data is available, but not wait for a full buffer. Writes will block until there is space available and writes bigger than the buffer will wait for reads to make space.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed May 15 00:11:04 UTC 2024 - 2.1K bytes - Viewed (0) -
docs/bucket/versioning/versioning-tests.sh
./mc mb sitea/delissue --insecure ./mc version enable sitea/delissue --insecure echo hello | ./mc pipe sitea/delissue/hello --insecure ./mc version suspend sitea/delissue --insecure ./mc rm sitea/delissue/hello --insecure ./mc version enable sitea/delissue --insecure echo hello | ./mc pipe sitea/delissue/hello --insecure ./mc version suspend sitea/delissue --insecure
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sat May 18 18:19:01 UTC 2024 - 2.4K bytes - Viewed (0)