зеркало из https://github.com/github/ruby.git
Embed ThreadGroup object
These are rare but embedding them is trivial and make them fit in a 40B slot.
This commit is contained in:
Родитель
295d648f76
Коммит
c8d99fa662
14
thread.c
14
thread.c
|
@ -4693,16 +4693,14 @@ struct thgroup {
|
|||
int enclosed;
|
||||
};
|
||||
|
||||
static size_t
|
||||
thgroup_memsize(const void *ptr)
|
||||
{
|
||||
return sizeof(struct thgroup);
|
||||
}
|
||||
|
||||
static const rb_data_type_t thgroup_data_type = {
|
||||
"thgroup",
|
||||
{0, RUBY_TYPED_DEFAULT_FREE, thgroup_memsize,},
|
||||
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
|
||||
{
|
||||
0,
|
||||
RUBY_TYPED_DEFAULT_FREE,
|
||||
NULL, // No external memory to report
|
||||
},
|
||||
0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED | RUBY_TYPED_EMBEDDABLE
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Загрузка…
Ссылка в новой задаче