Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for numCalls (0.11 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

            new Runnable() {
              @Override
              public void run() {
                numCalls.incrementAndGet();
              }
            };
        assertThrows(RejectedExecutionException.class, () -> executor.execute(task));
        assertEquals(0, numCalls.get());
        reject.set(false);
        executor.execute(task);
        assertEquals(1, numCalls.get());
      }
    
      /*
       * Under Android, MyError propagates up and fails the test?
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 11.4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

            new Runnable() {
              @Override
              public void run() {
                numCalls.incrementAndGet();
              }
            };
        assertThrows(RejectedExecutionException.class, () -> executor.execute(task));
        assertEquals(0, numCalls.get());
        reject.set(false);
        executor.execute(task);
        assertEquals(1, numCalls.get());
      }
    
      /*
       * Under Android, MyError propagates up and fails the test?
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 11.4K bytes
    - Viewed (0)
  3. pkg/util/oom/oom_linux_test.go

    func sequenceToPidLister(pidListSequence [][]int) func(string) ([]int, error) {
    	var numCalls int
    	return func(cgroupName string) ([]int, error) {
    		numCalls++
    		if len(pidListSequence) == 0 {
    			return []int{}, nil
    		} else if numCalls > len(pidListSequence) {
    			return pidListSequence[len(pidListSequence)-1], nil
    		}
    		return pidListSequence[numCalls-1], nil
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 24 19:47:49 UTC 2021
    - 3.3K bytes
    - Viewed (0)
  4. src/net/rpc/debug.go

    	<hr>
    		<table>
    		<th align=center>Method</th><th align=center>Calls</th>
    		{{range .Method}}
    			<tr>
    			<td align=left font=fixed>{{.Name}}({{.Type.ArgType}}, {{.Type.ReplyType}}) error</td>
    			<td align=center>{{.Type.NumCalls}}</td>
    			</tr>
    		{{end}}
    		</table>
    	{{end}}
    	</body>
    	</html>`
    
    var debug = template.Must(template.New("RPC debug").Parse(debugText))
    
    // If set, print log statements for internal and I/O errors.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  5. src/net/rpc/server.go

    	server.freeResponse(resp)
    }
    
    func (m *methodType) NumCalls() (n uint) {
    	m.Lock()
    	n = m.numCalls
    	m.Unlock()
    	return n
    }
    
    func (s *service) call(server *Server, sending *sync.Mutex, wg *sync.WaitGroup, mtype *methodType, req *Request, argv, replyv reflect.Value, codec ServerCodec) {
    	if wg != nil {
    		defer wg.Done()
    	}
    	mtype.Lock()
    	mtype.numCalls++
    	mtype.Unlock()
    	function := mtype.method.Func
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  6. pkg/printers/internalversion/printers_test.go

    		}
    	}
    }
    
    type TestPrintHandler struct {
    	numCalls int
    }
    
    func (t *TestPrintHandler) TableHandler(columnDefinitions []metav1.TableColumnDefinition, printFunc interface{}) error {
    	t.numCalls++
    	return nil
    }
    
    func (t *TestPrintHandler) getNumCalls() int {
    	return t.numCalls
    }
    
    func TestAllHandlers(t *testing.T) {
    	h := &TestPrintHandler{numCalls: 0}
    	AddHandlers(h)
    	if h.getNumCalls() == 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 14:04:15 UTC 2024
    - 218.6K bytes
    - Viewed (0)
  7. src/strconv/itoa.go

    	if fastSmalls && i < nSmalls && base == 10 {
    		return append(dst, small(int(i))...)
    	}
    	dst, _ = formatBits(dst, i, base, false, true)
    	return dst
    }
    
    // small returns the string for an i with 0 <= i < nSmalls.
    func small(i int) string {
    	if i < 10 {
    		return digits[i : i+1]
    	}
    	return smallsString[i*2 : i*2+2]
    }
    
    const nSmalls = 100
    
    const smallsString = "00010203040506070809" +
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:21:28 UTC 2024
    - 5.3K bytes
    - Viewed (0)
Back to top