Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 1,754 for closeFn (0.12 sec)

  1. src/cmd/compile/internal/syntax/testdata/chans.go

    func (s *Sender[T]) Send(v T) bool {
    	select {
    	case s.values <- v:
    		return true
    	case <-s.done:
    		return false
    	}
    }
    
    // Close tells the receiver that no more values will arrive.
    // After Close is called, the Sender may no longer be used.
    func (s *Sender[T]) Close() {
    	close(s.values)
    }
    
    // A Receiver receives values from a Sender.
    type Receiver[T any] struct {
    	values <-chan T
    	done   chan<- bool
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 30 18:02:18 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  2. internal/event/target/postgresql.go

    	}
    
    	// Delete the event from store.
    	return target.store.Del(key.Name)
    }
    
    // Close - closes underneath connections to PostgreSQL database.
    func (target *PostgreSQLTarget) Close() error {
    	close(target.quitCh)
    	if target.updateStmt != nil {
    		// FIXME: log returned error. ignore time being.
    		_ = target.updateStmt.Close()
    	}
    
    	if target.deleteStmt != nil {
    		// FIXME: log returned error. ignore time being.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  3. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/service/DefaultServiceRegistryTest.groovy

            registry.getAll(String)
            registry.close()
    
            when:
            registry.get(String)
    
            then:
            IllegalStateException e = thrown()
            e.message == "TestRegistry has been closed."
    
            when:
            registry.getAll(String)
    
            then:
            e = thrown()
            e.message == "TestRegistry has been closed."
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon May 27 12:53:25 UTC 2024
    - 59.8K bytes
    - Viewed (0)
  4. src/cmd/go/internal/lockedfile/lockedfile_filelock.go

    				filelock.Unlock(f)
    				f.Close()
    				return nil, err
    			}
    		}
    	}
    
    	return f, nil
    }
    
    func closeFile(f *os.File) error {
    	// Since locking syscalls operate on file descriptors, we must unlock the file
    	// while the descriptor is still valid — that is, before the file is closed —
    	// and avoid unlocking files that are already closed.
    	err := filelock.Unlock(f)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 1.7K bytes
    - Viewed (0)
  5. src/internal/xcoff/file.go

    // If the File was created using NewFile directly instead of Open,
    // Close has no effect.
    func (f *File) Close() error {
    	var err error
    	if f.closer != nil {
    		err = f.closer.Close()
    		f.closer = nil
    	}
    	return err
    }
    
    // Section returns the first section with the given name, or nil if no such
    // section exists.
    // Xcoff have section's name limited to 8 bytes. Some sections like .gosymtab
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 12 14:42:29 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  6. platforms/core-runtime/client-services/src/test/groovy/org/gradle/internal/daemon/client/clientinput/DaemonClientInputForwarderTest.groovy

            then:
            !receivedCommand()
        }
    
        def "stream being closed without sending anything just sends close input command"() {
            when:
            forwarder.stop()
    
            then:
            receiveClosed()
        }
    
        def cleanup() {
            source.close()
            inputStream.close()
            forwarder.stop()
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 28 12:11:05 UTC 2024
    - 5K bytes
    - Viewed (0)
  7. pkg/queue/util.go

    func WaitForClose(q Instance, timeout time.Duration) error {
    	closed := q.Closed()
    	if timeout == 0 {
    		<-closed
    		return nil
    	}
    	timer := time.NewTimer(timeout)
    	defer timer.Stop()
    	select {
    	case <-closed:
    		return nil
    	case <-timer.C:
    		return fmt.Errorf("timeout waiting for queue to close after %v", timeout)
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jul 14 06:36:32 UTC 2022
    - 1.1K bytes
    - Viewed (0)
  8. platforms/core-runtime/daemon-services/src/test/groovy/org/gradle/internal/daemon/clientinput/StdInStreamTest.groovy

        }
    
        def "read byte returns when stream is closed"() {
            def dispatch = Mock(OutputEventListener)
            def stream = new StdInStream(dispatch)
    
            when:
            async {
                start {
                    def b1 = stream.read()
                    assert b1 == -1
                }
                thread.blockUntil.requested
                stream.close()
            }
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 15 19:51:37 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/Response.kt

      fun receivedResponseAtMillis(): Long = receivedResponseAtMillis
    
      /**
       * Closes the response body. Equivalent to `body().close()`.
       *
       * Prior to OkHttp 5.0, it was an error to close a response that is not eligible for a body. This
       * includes the responses returned from [cacheResponse], [networkResponse], and [priorResponse].
       */
      override fun close() = commonClose()
    
      override fun toString(): String = commonToString()
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Tue Jan 23 14:31:42 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  10. .github/stale.yml

    # Number of days of inactivity before an Issue or Pull Request becomes stale
    daysUntilStale: 30
    
    # Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
    # Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
    daysUntilClose: 15
    
    # Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
    onlyLabels: []
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jan 24 04:36:59 UTC 2022
    - 2K bytes
    - Viewed (0)
Back to top