Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 2,175 for close1 (0.11 sec)

  1. test/closedchan.go

    // Test close(c), receive of closed channel.
    //
    // TODO(rsc): Doesn't check behavior of close(c) when there
    // are blocked senders/receivers.
    
    package main
    
    import "os"
    
    var failed bool
    
    type Chan interface {
    	Send(int)
    	Nbsend(int) bool
    	Recv() (int)
    	Nbrecv() (int, bool)
    	Recv2() (int, bool)
    	Nbrecv2() (int, bool, bool)
    	Close()
    	Impl() string
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 04:48:57 UTC 2012
    - 5.8K bytes
    - Viewed (0)
  2. src/net/rpc/client_test.go

    	codec := &shutdownCodec{responded: make(chan int)}
    	client := NewClientWithCodec(codec)
    	<-codec.responded
    	client.Close()
    	if !codec.closed {
    		t.Error("client.Close did not close codec")
    	}
    }
    
    // Test that errors in gob shut down the connection. Issue 7689.
    
    type R struct {
    	msg []byte // Not exported, so R does not work with gob.
    }
    
    type S struct{}
    
    func (s *S) Recv(nul *struct{}, reply *R) error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 1.7K bytes
    - Viewed (0)
  3. internal/logger/logrotate.go

    // 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.
    // Once Close() exits, files are synchronized to disk.
    func (w *Writer) Close() error {
    	w.pw.CloseWithError(nil)
    
    	if w.f != nil {
    		if err := w.closeCurrentFile(); err != nil {
    			return err
    		}
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  4. .github/workflows/stale-pr.yml

                It will be closed in 14 days if no further activity occurs.
                If you don't want the stale bot to close it, then set a milestone for it.
              days-before-pr-close: 14
              close-pr-message: >
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 02 09:13:16 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/io/AppendableWriterTest.java

        Writer writer = new AppendableWriter(spy);
    
        writer.write("Hello");
        assertFalse(spy.flushed);
        assertFalse(spy.closed);
    
        writer.flush();
        assertTrue(spy.flushed);
        assertFalse(spy.closed);
    
        writer.close();
        assertTrue(spy.flushed);
        assertTrue(spy.closed);
      }
    
      public void testCloseIsFinal() throws IOException {
        StringBuilder builder = new StringBuilder();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  6. test/typeparam/chansimp.dir/a.go

    // This will leave a goroutine running until either both channels are closed
    // or the context is canceled, at which point the returned channel is closed.
    func Merge[Elem any](ctx context.Context, c1, c2 <-chan Elem) <-chan Elem {
    	r := make(chan Elem)
    	go func(ctx context.Context, c1, c2 <-chan Elem, r chan<- Elem) {
    		defer close(r)
    		for c1 != nil || c2 != nil {
    			select {
    			case <-ctx.Done():
    				return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 28 21:40:40 UTC 2021
    - 5.5K bytes
    - Viewed (0)
  7. test/fixedbugs/issue15975.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    var fail bool
    
    type Closer interface {
    	Close()
    }
    
    func nilInterfaceDeferCall() {
    	var x Closer
    	defer x.Close()
    	// if it panics when evaluating x.Close, it should not reach here
    	fail = true
    }
    
    func shouldPanic(f func()) {
    	defer func() {
    		if recover() == nil {
    			panic("did not panic")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 08 20:35:53 UTC 2016
    - 572 bytes
    - Viewed (0)
  8. test/typeparam/chans.go

    // This will leave a goroutine running until either both channels are closed
    // or the context is canceled, at which point the returned channel is closed.
    func _Merge[Elem any](ctx context.Context, c1, c2 <-chan Elem) <-chan Elem {
    	r := make(chan Elem)
    	go func(ctx context.Context, c1, c2 <-chan Elem, r chan<- Elem) {
    		defer close(r)
    		for c1 != nil || c2 != nil {
    			select {
    			case <-ctx.Done():
    				return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 8.4K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/io/CloseablesTest.java

        Closeables.closeQuietly(in);
        assertTrue(in.closed());
      }
    
      public void testCloseQuietly_readerWithEatenException() throws IOException {
        TestReader in = new TestReader(TestOption.CLOSE_THROWS);
        Closeables.closeQuietly(in);
        assertTrue(in.closed());
      }
    
      public void testCloseNull() throws IOException {
        Closeables.close(null, true);
        Closeables.close(null, false);
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 4K bytes
    - Viewed (0)
  10. platforms/core-execution/build-cache-local/src/main/java/org/gradle/caching/local/internal/DirectoryBuildCache.java

            tempFileStore.withTempFile(key, file -> {
                try {
                    Closer closer = Closer.create();
                    try {
                        result.accept(closer.register(new FileOutputStream(file)));
                    } catch (Exception e) {
                        throw closer.rethrow(e);
                    } finally {
                        closer.close();
                    }
                } catch (IOException ex) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:53 UTC 2024
    - 7K bytes
    - Viewed (0)
Back to top