示例#1
0
文件: fdb.go 项目: rayleyva/fdb-go
func startNetwork() error {
	if e := C.fdb_setup_network(); e != 0 {
		return Error(e)
	}

	go C.fdb_run_network()

	networkStarted = true

	return nil
}
示例#2
0
文件: fdb.go 项目: ptomasroos/fdb-go
func startNetwork() error {
	if e := C.fdb_setup_network(); e != 0 {
		return Error{int(e)}
	}

	go func() {
		e := C.fdb_run_network()
		if e != 0 {
			log.Printf("Unhandled error in FoundationDB network thread: %v (%v)\n", C.GoString(C.fdb_get_error(e)), e)
		}
	}()

	networkStarted = true

	return nil
}