INNER CODE UNIT · Go

ticker

openai/tart · integration-tests/clone_lock_darwin_test.go:152

			ticker := time.NewTicker(10 * time.Millisecond)
			defer ticker.Stop()
			for {
				lock := syscall.Flock_t{Type: syscall.F_RDLCK, Whence: 0}
				if err := syscall.FcntlFlock(config.Fd(), syscall.F_GETLK, &lock); err != nil {
					t.Fatal(err)
				}
				if lock.Type == syscall.F_WRLCK && lock.Pid == int32(cmd.Process.Pid) {
					break
				}
				select {
				case <-done:
					t.Fatalf("%s exited before taking the destination PID lock: %v: %s", operation, waitErr, output.String())
				case <-ticker.C:
				}
			}

			// The command has reached replacement and cannot finish while

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…