1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* thread.c (rb_thread_io_blocking_region): new function to run

blocking region with GIL released, for fd.
* thread.c (rb_thread_fd_close): implement.  [ruby-core:35203]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-02-12 05:44:23 +00:00
parent dda8de065c
commit 58b325366d
11 changed files with 94 additions and 13 deletions

View file

@ -559,7 +559,7 @@ rsock_bsock_send(int argc, VALUE *argv, VALUE sock)
arg.fd = fptr->fd;
arg.flags = NUM2INT(flags);
while (rb_thread_fd_writable(arg.fd),
(n = (int)BLOCKING_REGION(func, &arg)) < 0) {
(n = (int)BLOCKING_REGION_FD(func, &arg)) < 0) {
if (rb_io_wait_writable(arg.fd)) {
continue;
}