зеркало из https://github.com/github/ruby.git
* thread.c (rb_thread_select): release GVL while waiting select().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
3cea846e42
Коммит
4d88169267
|
@ -1,3 +1,7 @@
|
|||
Sun May 1 01:06:24 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* thread.c (rb_thread_select): release GVL while waiting select().
|
||||
|
||||
Sat Apr 30 23:10:15 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* win32/win32.c (rb_w32_fdcopy): New. This can copy even though
|
||||
|
|
12
thread.c
12
thread.c
|
@ -2672,7 +2672,17 @@ rb_thread_select(int max, fd_set * read, fd_set * write, fd_set * except,
|
|||
return 0;
|
||||
}
|
||||
else {
|
||||
return select(max, read, write, except, timeout);
|
||||
int lerrno;
|
||||
int result;
|
||||
|
||||
BLOCKING_REGION({
|
||||
result = select(max, read, write, except, timeout);
|
||||
if (result < 0)
|
||||
lerrno = errno;
|
||||
}, ubf_select, GET_THREAD());
|
||||
errno = lerrno;
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче