зеркало из https://github.com/github/ruby.git
Add debug assertion in `rb_funcall*` that the current thread has the gvl.
This commit is contained in:
Родитель
55a79b648c
Коммит
6073a8bdc0
|
@ -15206,6 +15206,7 @@ vm.$(OBJEXT): $(top_srcdir)/internal/serial.h
|
|||
vm.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
|
||||
vm.$(OBJEXT): $(top_srcdir)/internal/string.h
|
||||
vm.$(OBJEXT): $(top_srcdir)/internal/symbol.h
|
||||
vm.$(OBJEXT): $(top_srcdir)/internal/thread.h
|
||||
vm.$(OBJEXT): $(top_srcdir)/internal/variable.h
|
||||
vm.$(OBJEXT): $(top_srcdir)/internal/vm.h
|
||||
vm.$(OBJEXT): $(top_srcdir)/internal/warnings.h
|
||||
|
|
1
vm.c
1
vm.c
|
@ -23,6 +23,7 @@
|
|||
#include "internal/proc.h"
|
||||
#include "internal/re.h"
|
||||
#include "internal/symbol.h"
|
||||
#include "internal/thread.h"
|
||||
#include "internal/vm.h"
|
||||
#include "internal/sanitizers.h"
|
||||
#include "iseq.h"
|
||||
|
|
|
@ -1036,12 +1036,16 @@ rb_funcallv_scope(VALUE recv, ID mid, int argc, const VALUE *argv, call_type sco
|
|||
VALUE
|
||||
rb_funcallv(VALUE recv, ID mid, int argc, const VALUE *argv)
|
||||
{
|
||||
VM_ASSERT(ruby_thread_has_gvl_p());
|
||||
|
||||
return rb_funcallv_scope(recv, mid, argc, argv, CALL_FCALL);
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_funcallv_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
|
||||
{
|
||||
VM_ASSERT(ruby_thread_has_gvl_p());
|
||||
|
||||
return rb_call(recv, mid, argc, argv, kw_splat ? CALL_FCALL_KW : CALL_FCALL);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче