Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for unblocking (0.21 sec)

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

        // thread because the task will block on the task latch after unblocking
        // the run latch.
        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();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

        // thread because the task will block on the task latch after unblocking
        // the run latch.
        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();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  3. internal/lock/lock_test.go

    	}()
    
    	select {
    	case <-locked:
    		t.Error("unexpected unblocking")
    	case <-time.After(100 * time.Millisecond):
    	}
    
    	// unlock
    	if err = dupl.Close(); err != nil {
    		t.Fatal(err)
    	}
    
    	// the previously blocked routine should be unblocked
    	select {
    	case <-locked:
    	case <-time.After(1 * time.Second):
    		t.Error("unexpected blocking")
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.6K bytes
    - Viewed (0)
  4. docs/contribute/concurrency.md

    ## HTTP/2 Connections
    
    The HttpURLConnection API is a blocking API. You make a blocking write to send a request, and a blocking read to receive the response.
    
    #### Blocking APIs
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 16:35:36 GMT 2022
    - 7K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java

          getDone(task);
          fail();
        } catch (ExecutionException executionException) {
          assertThat(executionException).hasCauseThat().isEqualTo(e);
        }
      }
    
      @J2ktIncompatible
      @GwtIncompatible // blocking wait
      public void testCancel_interrupted() throws Exception {
        final AtomicBoolean interruptedExceptionThrown = new AtomicBoolean();
        final CountDownLatch enterLatch = new CountDownLatch(1);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java

          Future<V> future) {
        if (future instanceof ListenableFuture) {
          return (ListenableFuture<V>) future;
        }
        return new ListenableFutureAdapter<>(future);
      }
    
      /**
       * Submits a blocking task for the given {@link Future} to provide {@link ListenableFuture}
       * functionality.
       *
       * <p><b>Warning:</b> If the input future does not already implement {@code ListenableFuture}, the
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Dec 14 20:35:03 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  7. internal/lock/lock_nix.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package lock
    
    import (
    	"os"
    	"syscall"
    )
    
    // Internal function implements support for both
    // blocking and non blocking lock type.
    func lockedOpenFile(path string, flag int, perm os.FileMode, lockType int) (*LockedFile, error) {
    	switch flag {
    	case syscall.O_RDONLY:
    		lockType |= syscall.LOCK_SH
    	case syscall.O_WRONLY:
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Aug 19 01:35:22 GMT 2021
    - 2.8K bytes
    - Viewed (0)
  8. internal/logger/logrotate.go

    	// or when files are being rotated.
    	f *os.File
    
    	pw *xioutil.PipeWriter
    	pr *xioutil.PipeReader
    }
    
    // Write writes p into the current file, rotating if necessary.
    // Write is non-blocking, if the writer's queue is not full.
    // Write is blocking otherwise.
    func (w *Writer) Write(p []byte) (n int, err error) {
    	return w.pw.Write(p)
    }
    
    // Close closes the writer.
    // Any accepted writes will be flushed. Any new writes will be rejected.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu May 02 11:38:40 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java

          getDone(task);
          fail();
        } catch (ExecutionException executionException) {
          assertThat(executionException).hasCauseThat().isEqualTo(e);
        }
      }
    
      @J2ktIncompatible
      @GwtIncompatible // blocking wait
      public void testCancel_interrupted() throws Exception {
        final AtomicBoolean interruptedExceptionThrown = new AtomicBoolean();
        final CountDownLatch enterLatch = new CountDownLatch(1);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  10. internal/bpool/bpool.go

    	}
    	return &BytePoolCap{
    		c:    make(chan []byte, maxSize),
    		w:    width,
    		wcap: capwidth,
    	}
    }
    
    // Populate - populates and pre-warms the byte pool, this function is non-blocking.
    func (bp *BytePoolCap) Populate() {
    	for _, buf := range reedsolomon.AllocAligned(cap(bp.c), bp.wcap) {
    		bp.Put(buf[:bp.w])
    	}
    }
    
    // Get gets a []byte from the BytePool, or creates a new one if none are
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 2.6K bytes
    - Viewed (0)
Back to top