Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 46 for Wait (0.17 sec)

  1. src/cmd/go/internal/lockedfile/lockedfile_test.go

    	mu2 := lockedfile.MutexAt(mu.Path)
    	t.Logf("mu2 := MutexAt(mu.Path)")
    
    	wait := mustBlock(t, "mu2.Lock()", func() {
    		unlock2, err := mu2.Lock()
    		if err != nil {
    			t.Errorf("mu2.Lock: %v", err)
    			return
    		}
    		t.Logf("unlock2, _ := mu2.Lock()")
    		t.Logf("unlock2()")
    		unlock2()
    	})
    
    	t.Logf("unlock()")
    	unlock()
    	wait(t)
    }
    
    func TestReadWaitsForLock(t *testing.T) {
    	t.Parallel()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:29 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  2. src/cmd/go/internal/par/work.go

    			if w.waiting == w.running {
    				// All done.
    				w.wait.Broadcast()
    				w.mu.Unlock()
    				return
    			}
    			w.wait.Wait()
    			w.waiting--
    		}
    
    		// Pick something to do at random,
    		// to eliminate pathological contention
    		// in case items added at about the same time
    		// are most likely to contend.
    		i := rand.Intn(len(w.todo))
    		item := w.todo[i]
    		w.todo[i] = w.todo[len(w.todo)-1]
    		w.todo = w.todo[:len(w.todo)-1]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 15:54:54 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java

          }
          barrier.await(); // release the threads!
          barrier.await(); // wait for them all to complete
          assertEquals(1, task.get().intValue());
          assertEquals(1, counter.get());
        }
        executor.shutdown();
      }
    
      @J2ktIncompatible
      @GwtIncompatible // blocking wait
      public void testToString() throws Exception {
        final CountDownLatch enterLatch = new CountDownLatch(1);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 13 14:28:25 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  4. fess-crawler/src/test/java/org/codelibs/fess/crawler/interval/impl/HostIntervalControllerTest.java

            } catch (final ExecutionException e) {
                // no thing to do
            }
    
            long elapsed = (System.nanoTime() - time) / 1000000;
            long wait = waittime * (numTasks - 1);
            assertTrue(elapsed + " >= " + wait, elapsed + 1L >= wait);
        }
    Registered: Wed Jun 12 15:17:51 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

        exec.execute(task);
        runLatch.await();
        assertEquals(1, listenerLatch.getCount());
        assertFalse(task.isDone());
        assertFalse(task.isCancelled());
    
        // Finish the task by unblocking the task latch.  Then wait for the
        // listener to be called by blocking on the listener latch.
        taskLatch.countDown();
        assertEquals(25, task.get().intValue());
        assertTrue(listenerLatch.await(5, TimeUnit.SECONDS));
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  6. src/cmd/go/scriptcmds_test.go

    		},
    		func(s *script.State, args ...string) (script.WaitFunc, error) {
    			b := work.NewBuilder(s.Getwd())
    			wait, err := cmdExec.Run(s, append(b.GccCmd(".", ""), args...)...)
    			if err != nil {
    				return wait, err
    			}
    			waitAndClean := func(s *script.State) (stdout, stderr string, err error) {
    				stdout, stderr, err = wait(s)
    				if closeErr := b.Close(); err == nil {
    					err = closeErr
    				}
    				return stdout, stderr, err
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 18:33:17 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java

          }
          barrier.await(); // release the threads!
          barrier.await(); // wait for them all to complete
          assertEquals(1, task.get().intValue());
          assertEquals(1, counter.get());
        }
        executor.shutdown();
      }
    
      @J2ktIncompatible
      @GwtIncompatible // blocking wait
      public void testToString() throws Exception {
        final CountDownLatch enterLatch = new CountDownLatch(1);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 13 14:28:25 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

        exec.execute(task);
        runLatch.await();
        assertEquals(1, listenerLatch.getCount());
        assertFalse(task.isDone());
        assertFalse(task.isCancelled());
    
        // Finish the task by unblocking the task latch.  Then wait for the
        // listener to be called by blocking on the listener latch.
        taskLatch.countDown();
        assertEquals(25, task.get().intValue());
        assertTrue(listenerLatch.await(5, TimeUnit.SECONDS));
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  9. guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java

        }
        return new ListenableFutureAdapter<>(future, executor);
      }
    
      /**
       * An adapter to turn a {@link Future} into a {@link ListenableFuture}. This will wait on the
       * future to finish, and when it completes, run the listeners. This implementation will wait on
       * the source future indefinitely, so if the source future never completes, the adapter will never
       * complete either.
       *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Dec 14 20:35:03 UTC 2023
    - 7.5K bytes
    - Viewed (0)
  10. src/cmd/go/internal/script/scripttest/scripttest.go

    				t.Log(strings.TrimSuffix(log.String(), "\n"))
    			}
    		}()
    
    		if testing.Verbose() {
    			// Add the environment to the start of the script log.
    			wait, err := script.Env().Run(s)
    			if err != nil {
    				t.Fatal(err)
    			}
    			if wait != nil {
    				stdout, stderr, err := wait(s)
    				if err != nil {
    					t.Fatalf("env: %v\n%s", err, stderr)
    				}
    				if len(stdout) > 0 {
    					s.Logf("%s\n", stdout)
    				}
    			}
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 11 20:12:18 UTC 2023
    - 3.7K bytes
    - Viewed (0)
Back to top