- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for WriteOnce (0.14 sec)
-
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/promise/promise.go
package promise import ( "context" "sync" ) // promise implements the WriteOnce interface. type promise struct { doneCtx context.Context doneVal interface{} setCh chan struct{} onceler sync.Once value interface{} } var _ WriteOnce = &promise{} // NewWriteOnce makes a new thread-safe WriteOnce. // // If `initial` is non-nil then that value is Set at creation time. //
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Aug 21 19:19:31 UTC 2023 - 1.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/promise/promise_test.go
} func goGetExpectNotYet(t *testing.T, wr WriteOnce, gots chan interface{}, trigger string) { go func() { gots <- wr.Get() }() select { case <-gots: t.Errorf("Get returned before %s", trigger) case <-time.After(time.Second): t.Log("Good: Get did not return yet") } } func goGetAndExpect(t *testing.T, wr WriteOnce, gots chan interface{}, expected interface{}) { go func() {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Aug 21 19:19:31 UTC 2023 - 3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/types.go
// decisionCancel, or decisionExecute. // // decision.Set is called with the queueSet locked. // decision.Get is called without the queueSet locked. decision promise.WriteOnce // arrivalTime is the real time when the request entered this system arrivalTime time.Time // descr1 and descr2 are not used in any logic but they appear in // log messages descr1, descr2 interface{}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 18 17:38:43 UTC 2023 - 6.9K bytes - Viewed (0) -
src/internal/poll/fd_unix.go
// WaitWrite waits until data can be written to fd. func (fd *FD) WaitWrite() error { return fd.pd.waitWrite(fd.isFile) } // WriteOnce is for testing only. It makes a single write call. func (fd *FD) WriteOnce(p []byte) (int, error) { if err := fd.writeLock(); err != nil { return 0, err } defer fd.writeUnlock() return ignoringEINTRIO(syscall.Write, fd.Sysfd, p) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 31 04:09:44 UTC 2024 - 17.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/queueset.go
promiseFactoryFactory promiseFactoryFactory } // promiseFactory returns a WriteOnce // - whose Set method is invoked with the queueSet locked, and // - whose Get method is invoked with the queueSet not locked. // The parameters are the same as for `promise.NewWriteOnce`. type promiseFactory func(initial interface{}, doneCtx context.Context, doneVal interface{}) promise.WriteOnce
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jan 04 16:59:21 UTC 2024 - 42.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/queueset_test.go
func countingPromiseFactoryFactory(activeCounter counter.GoRoutineCounter) promiseFactoryFactory { return func(qs *queueSet) promiseFactory { return func(initial interface{}, doneCtx context.Context, doneVal interface{}) promise.WriteOnce { return testpromise.NewCountingWriteOnce(activeCounter, &qs.lock, initial, doneCtx.Done(), doneVal) } } } func TestTotalRequestsExecutingWithPanic(t *testing.T) { metrics.Register()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Sep 26 12:55:23 UTC 2023 - 58.4K bytes - Viewed (0)