mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@241f9e7
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e59bf54b3a
commit
e87fb88be8
142 changed files with 1165 additions and 1078 deletions
|
@ -27,7 +27,7 @@ static VALUE thread_spec_rb_thread_alone() {
|
|||
/* This is unblocked by unblock_func(). */
|
||||
static void* blocking_gvl_func(void* data) {
|
||||
int rfd = *(int *)data;
|
||||
char dummy;
|
||||
char dummy = ' ';
|
||||
ssize_t r;
|
||||
|
||||
do {
|
||||
|
@ -36,7 +36,7 @@ static void* blocking_gvl_func(void* data) {
|
|||
|
||||
close(rfd);
|
||||
|
||||
return (void*)((r == 1) ? Qtrue : Qfalse);
|
||||
return (void*)((r == 1 && dummy == 'A') ? Qtrue : Qfalse);
|
||||
}
|
||||
|
||||
static void unblock_gvl_func(void *data) {
|
||||
|
@ -57,7 +57,7 @@ static VALUE thread_spec_rb_thread_call_without_gvl(VALUE self) {
|
|||
void* ret;
|
||||
|
||||
if (pipe(fds) == -1) {
|
||||
return Qfalse;
|
||||
rb_raise(rb_eRuntimeError, "could not create pipe");
|
||||
}
|
||||
ret = rb_thread_call_without_gvl(blocking_gvl_func, &fds[0],
|
||||
unblock_gvl_func, &fds[1]);
|
||||
|
@ -82,7 +82,7 @@ static VALUE thread_spec_rb_thread_call_without_gvl_with_ubf_io(VALUE self) {
|
|||
void* ret;
|
||||
|
||||
if (pipe(fds) == -1) {
|
||||
return Qfalse;
|
||||
rb_raise(rb_eRuntimeError, "could not create pipe");
|
||||
}
|
||||
|
||||
ret = rb_thread_call_without_gvl(blocking_gvl_func_for_udf_io,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue