Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 551 for closeFD (0.12 sec)

  1. src/runtime/os_plan9.go

    	fd := open(&buf[0], _OWRITE, 0)
    	if fd < 0 {
    		return -1
    	}
    	len := findnull(&msg[0])
    	if write1(uintptr(fd), unsafe.Pointer(&msg[0]), int32(len)) != int32(len) {
    		closefd(fd)
    		return -1
    	}
    	closefd(fd)
    	return 0
    }
    
    //go:nosplit
    func exit(e int32) {
    	var status []byte
    	if e == 0 {
    		status = emptystatus
    	} else {
    		// build error string
    		var tmp [32]byte
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  2. src/time/zoneinfo_read.go

    // in the given uncompressed zip file.
    func loadTzinfoFromZip(zipfile, name string) ([]byte, error) {
    	fd, err := open(zipfile)
    	if err != nil {
    		return nil, err
    	}
    	defer closefd(fd)
    
    	const (
    		zecheader = 0x06054b50
    		zcheader  = 0x02014b50
    		ztailsize = 22
    
    		zheadersize = 30
    		zheader     = 0x04034b50
    	)
    
    	buf := make([]byte, ztailsize)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  3. src/runtime/sys_darwin.go

    	var p [2]int32
    	errno = libcCall(unsafe.Pointer(abi.FuncPCABI0(pipe_trampoline)), noescape(unsafe.Pointer(&p)))
    	return p[0], p[1], errno
    }
    func pipe_trampoline()
    
    //go:nosplit
    //go:cgo_unsafe_args
    func closefd(fd int32) int32 {
    	return libcCall(unsafe.Pointer(abi.FuncPCABI0(close_trampoline)), unsafe.Pointer(&fd))
    }
    func close_trampoline()
    
    // This is exported via linkname to assembly in runtime/cgo.
    //
    //go:nosplit
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  4. guava/src/com/google/common/io/Closer.java

     *
     * <pre>{@code
     * Closer closer = Closer.create();
     * try {
     *   InputStream in = closer.register(openInputStream());
     *   OutputStream out = closer.register(openOutputStream());
     *   // do stuff
     * } catch (Throwable e) {
     *   // ensure that any checked exception types other than IOException that could be thrown are
     *   // provided here, e.g. throw closer.rethrow(e, CheckedException.class);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  5. src/runtime/os_windows.go

    	preemptExtLock uint32
    }
    
    // Stubs so tests can link correctly. These should never be called.
    func open(name *byte, mode, perm int32) int32 {
    	throw("unimplemented")
    	return -1
    }
    func closefd(fd int32) int32 {
    	throw("unimplemented")
    	return -1
    }
    func read(fd int32, p unsafe.Pointer, n int32) int32 {
    	throw("unimplemented")
    	return -1
    }
    
    type sigset struct{}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 22:55:25 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  6. src/runtime/export_test.go

    }
    
    const HashLoad = hashLoad
    
    // entry point for testing
    func GostringW(w []uint16) (s string) {
    	systemstack(func() {
    		s = gostringw(&w[0])
    	})
    	return
    }
    
    var Open = open
    var Close = closefd
    var Read = read
    var Write = write
    
    func Envs() []string     { return envs }
    func SetEnvs(e []string) { envs = e }
    
    const PtrSize = goarch.PtrSize
    
    var ForceGCPeriod = &forcegcperiod
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/io/Closer.java

     *
     * <pre>{@code
     * Closer closer = Closer.create();
     * try {
     *   InputStream in = closer.register(openInputStream());
     *   OutputStream out = closer.register(openOutputStream());
     *   // do stuff
     * } catch (Throwable e) {
     *   // ensure that any checked exception types other than IOException that could be thrown are
     *   // provided here, e.g. throw closer.rethrow(e, CheckedException.class);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  8. src/database/sql/sql_test.go

    	if !waitCondition(t, func() bool {
    		rows.closemu.RLock()
    		defer rows.closemu.RUnlock()
    		return rows.closed
    	}) {
    		t.Fatal("failed to close rows")
    	}
    }
    
    // TestQueryContextWait ensures that rows and all internal statements are closed when
    // a query context is closed during execution.
    func TestQueryContextWait(t *testing.T) {
    	db := newTestDB(t, "people")
    	defer closeDB(t, db)
    	prepares0 := numPrepares(t, db)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 111.6K bytes
    - Viewed (0)
  9. src/database/sql/sql.go

    	// and exclusively during close.
    	//
    	// closemu guards lasterr and closed.
    	closemu sync.RWMutex
    	lasterr error // non-nil only if closed is true
    	closed  bool
    
    	// closemuScanHold is whether the previous call to Scan kept closemu RLock'ed
    	// without unlocking it. It does that when the user passes a *RawBytes scan
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 103.6K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/CloserTest.java

        Closer closer = new Closer(suppressor);
    
        TestCloseable c1 = closer.register(TestCloseable.normal());
        TestCloseable c2 = closer.register(TestCloseable.normal());
    
        IOException exception = new IOException();
    
        try {
          try {
            throw exception;
          } catch (Throwable e) {
            throw closer.rethrow(e);
          } finally {
            closer.close();
          }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 11.8K bytes
    - Viewed (0)
Back to top