Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for releaseThread (0.16 sec)

  1. src/net/lookup_windows.go

    		proto int
    		err   error
    	}
    	ch := make(chan result) // unbuffered
    	go func() {
    		if err := acquireThread(ctx); err != nil {
    			ch <- result{err: mapErr(err)}
    			return
    		}
    		defer releaseThread()
    		runtime.LockOSThread()
    		defer runtime.UnlockOSThread()
    		proto, err := getprotobyname(name)
    		select {
    		case ch <- result{proto: proto, err: err}:
    		case <-ctx.Done():
    		}
    	}()
    	select {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:23:45 UTC 2024
    - 14.2K bytes
    - Viewed (0)
  2. src/net/cgo_unix.go

    			Err:       mapErr(err).Error(),
    			IsTimeout: err == context.DeadlineExceeded,
    		}
    	}
    
    	if ctx.Done() == nil {
    		defer releaseThread()
    		return blocking()
    	}
    
    	type result struct {
    		res T
    		err error
    	}
    
    	res := make(chan result, 1)
    	go func() {
    		defer releaseThread()
    		var r result
    		r.res, r.err = blocking()
    		res <- r
    	}()
    
    	select {
    	case r := <-res:
    		return r.res, r.err
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:23:45 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  3. src/net/net.go

    		threadLimit = make(chan struct{}, concurrentThreadsLimit())
    	})
    	select {
    	case threadLimit <- struct{}{}:
    		return nil
    	case <-ctx.Done():
    		return ctx.Err()
    	}
    }
    
    func releaseThread() {
    	<-threadLimit
    }
    
    // buffersWriter is the interface implemented by Conns that support a
    // "writev"-like batch write optimization.
    // writeBuffers should fully consume and write all chunks from the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

          DelayedActionRunnable toRun = new Release(semaphore, countdownInMillis);
          // TODO(cpovirk): automatically fail the test if this thread throws
          Thread releaserThread = new Thread(toRun);
          releaserThread.start();
        }
      }
    
      private abstract static class DelayedActionRunnable implements Runnable {
        private final long tMinus;
    
        protected DelayedActionRunnable(long tMinus) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 16:06:39 UTC 2024
    - 31.7K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

          DelayedActionRunnable toRun = new Release(semaphore, countdownInMillis);
          // TODO(cpovirk): automatically fail the test if this thread throws
          Thread releaserThread = new Thread(toRun);
          releaserThread.start();
        }
      }
    
      private abstract static class DelayedActionRunnable implements Runnable {
        private final long tMinus;
    
        protected DelayedActionRunnable(long tMinus) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 09 22:57:07 UTC 2022
    - 30.9K bytes
    - Viewed (0)
Back to top