| Age | Commit message (Collapse) | Author |
|
Fix -Wundef warnings for HAVE_RB_EXT_RACTOR_SAFE
* See [Feature #17752]
---
ext/cgi/escape/escape.c | 2 +-
ext/monitor/monitor.c | 2 +-
ext/racc/cparse/cparse.c | 2 +-
ext/zlib/zlib.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
|
|
Fix Monitor to lock per Fiber, like Mutex [Bug #17827]
---
ext/monitor/monitor.c | 10 +++++-----
test/monitor/test_monitor.rb | 7 +++++++
2 files changed, 12 insertions(+), 5 deletions(-)
|
|
|
|
Monitor#exit should be called by only onwer Thread. However, there
is not check for it.
|
|
MonitorMixin::ConditionVariable#wait can be interrupted just after
Monitor#exit_for_cond. So implementation in C.
|
|
Recent monitor.rb has performance problem because of interrupt
handlers. 'Monitor#synchronize' is frequently used primitive
so the performance of this method is important.
This patch rewrite 'monitor.rb' with 'monitor.so' (C-extension)
and make it faster. See [Feature #16255] for details.
Monitor class objects are normal object which include MonitorMixin.
This patch introduce a Monitor class which is implemented on C
and MonitorMixin uses Monitor object as re-entrant (recursive)
Mutex. This technique improve performance because we don't need
to care atomicity and we don't need accesses to instance variables
any more on Monitor class.
Notes:
Merged-By: ko1 <ko1@atdot.net>
|