mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
ruby_single_main_ractor for single ractor mode
ruby_multi_ractor was a flag that indicates the interpreter doesn't make any additional ractors (single ractor mode). Instead of boolean flag, ruby_single_main_ractor pointer is introduced which keeps main ractor's pointer if single ractor mode. If additional ractors are created, ruby_single_main_ractor becomes NULL.
This commit is contained in:
parent
60eabb1aa7
commit
b67b24d0f5
Notes:
git
2020-12-07 08:29:10 +09:00
4 changed files with 19 additions and 10 deletions
|
@ -176,12 +176,10 @@ void rb_ractor_local_storage_delkey(rb_ractor_local_key_t key);
|
|||
|
||||
RUBY_SYMBOL_EXPORT_END
|
||||
|
||||
RUBY_EXTERN bool ruby_multi_ractor;
|
||||
|
||||
static inline bool
|
||||
rb_ractor_main_p(void)
|
||||
{
|
||||
if (!ruby_multi_ractor) {
|
||||
if (ruby_single_main_ractor) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue