示例#1
0
文件: fd_posix.c 项目: Infixz/grpc
void grpc_fd_orphan(grpc_fd *fd, grpc_iomgr_cb_func on_done, void *user_data) {
  grpc_iomgr_closure_init(&fd->on_done_closure, on_done ? on_done : do_nothing,
                          user_data);
  shutdown(fd->fd, SHUT_RDWR);
  ref_by(fd, 1); /* remove active status, but keep referenced */
  gpr_mu_lock(&fd->watcher_mu);
  wake_all_watchers_locked(fd);
  gpr_mu_unlock(&fd->watcher_mu);
  unref_by(fd, 2); /* drop the reference */
}
示例#2
0
文件: fd_posix.c 项目: Infixz/grpc
void grpc_fd_unref(grpc_fd *fd) { unref_by(fd, 2); }
示例#3
0
文件: fd_posix.c 项目: sihai/grpc
void grpc_fd_unref(grpc_fd *fd, const char *reason, const char *file,
                   int line) {
  unref_by(fd, 2, reason, file, line);
}