Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 791 for readArg (0.59 sec)

  1. src/runtime/rwmutex_test.go

    func HammerRWMutex(gomaxprocs, numReaders, num_iterations int) {
    	GOMAXPROCS(gomaxprocs)
    	// Number of active readers + 10000 * number of active writers.
    	var activity int32
    	var rwm RWMutex
    	rwm.Init()
    	cdone := make(chan bool)
    	go writer(&rwm, num_iterations, &activity, cdone)
    	var i int
    	for i = 0; i < numReaders/2; i++ {
    		go reader(&rwm, num_iterations, &activity, cdone)
    	}
    	go writer(&rwm, num_iterations, &activity, cdone)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 15 22:00:45 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/sync/semaphore/semaphore.go

    			// Consider a semaphore used as a read-write lock, with N tokens, N
    			// readers, and one writer.  Each reader can Acquire(1) to obtain a read
    			// lock.  The writer can Acquire(N) to obtain a write lock, excluding all
    			// of the readers.  If we allow the readers to jump ahead in the queue,
    			// the writer will starve — there is always one token available for every
    			// reader.
    			break
    		}
    
    		s.cur += w.n
    		s.waiters.Remove(next)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/text/unicode/norm/readwriter.go

    			r.lastBoundary = lastBoundary(&r.rb.f, r.outbuf)
    			if r.lastBoundary == -1 {
    				r.lastBoundary = 0
    			}
    		}
    	}
    }
    
    // Reader returns a new reader that implements Read
    // by reading data from r and returning f(data).
    func (f Form) Reader(r io.Reader) io.Reader {
    	const chunk = 4000
    	buf := make([]byte, chunk)
    	rr := &normReader{rb: reorderBuffer{}, r: r, inbuf: buf}
    	rr.rb.init(f, buf)
    	return rr
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  4. src/net/http/internal/chunked_test.go

    	}
    }
    
    func TestChunkEndReadError(t *testing.T) {
    	readErr := fmt.Errorf("chunk end read error")
    
    	r := NewChunkedReader(io.MultiReader(strings.NewReader("4\r\nabcd"), iotest.ErrReader(readErr)))
    	if _, err := io.ReadAll(r); err != readErr {
    		t.Errorf("expected %v, got %v", readErr, err)
    	}
    }
    
    func TestChunkReaderTooMuchOverhead(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 04 20:45:19 UTC 2024
    - 8K bytes
    - Viewed (0)
  5. src/debug/dwarf/type_test.go

    		}
    	}
    }
    
    func TestTypedefCycle(t *testing.T) {
    	// See issue #13039: reading a typedef cycle starting from a
    	// different place than the size needed to be computed from
    	// used to crash.
    	//
    	// cycle.elf built with GCC 4.8.4:
    	//    gcc -g -c -o cycle.elf cycle.c
    	d := elfData(t, "testdata/cycle.elf")
    	r := d.Reader()
    	offsets := []Offset{}
    	for {
    		e, err := r.Next()
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 19 15:49:05 UTC 2022
    - 8.8K bytes
    - Viewed (0)
  6. src/internal/trace/batch.go

    	gen, err := binary.ReadUvarint(r)
    	if err != nil {
    		return batch{}, gen, fmt.Errorf("error reading batch gen: %w", err)
    	}
    	m, err := binary.ReadUvarint(r)
    	if err != nil {
    		return batch{}, gen, fmt.Errorf("error reading batch M ID: %w", err)
    	}
    	ts, err := binary.ReadUvarint(r)
    	if err != nil {
    		return batch{}, gen, fmt.Errorf("error reading batch timestamp: %w", err)
    	}
    
    	// Read in the size of the batch to follow.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/util/httpstream/wsstream/stream.go

    // before the stream begins reading.
    //
    // The protocols parameter maps subprotocol names to StreamProtocols. The empty string
    // subprotocol name is used if websocket.Config.Protocol is empty.
    func NewReader(r io.Reader, ping bool, protocols map[string]ReaderProtocolConfig) *Reader {
    	return &Reader{
    		r:           r,
    		err:         make(chan error),
    		ping:        ping,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 07 18:21:43 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  8. maven-core/src/test/resources-project-builder/execution-configuration/pom.xml

                        <execution>
                            <id>security.xml</id>
                            <goals>
                                <goal>java1</goal>
                                <goal>xpp3-reader1</goal>
                                <goal>xpp3-writer1</goal>
                            </goals>
                            <configuration>
                                <version>1.0.0</version>
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Wed Apr 29 05:20:38 UTC 2009
    - 2.2K bytes
    - Viewed (0)
  9. docs/contribute/concurrency.md

    Similarly, the reader thread must never block on writing because this can deadlock the connection. Consider a client and server that both violate this rule. If you get unlucky, they could fill up their TCP buffers (so that writes block) and then use their reader threads to write a frame. Nobody is reading on either end, and the buffers are never drained.
    
    #### Do-stuff-later pool
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sun Feb 06 16:35:36 UTC 2022
    - 7K bytes
    - Viewed (0)
  10. android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java

                // we called sizeIfKnown and when we started reading the file (or I guess if
                // maxCharsPerByte is wrong)
                // Fallback to an incremental approach
                StringBuilder builder = new StringBuilder(bufIndex + 32);
                builder.append(buffer, 0, bufIndex);
                buffer = null; // release for gc
                CharStreams.copy(reader, builder);
                return builder.toString();
              }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Oct 10 19:45:10 UTC 2022
    - 5.2K bytes
    - Viewed (0)
Back to top