summaryrefslogtreecommitdiff
path: root/ext/monitor
AgeCommit message (Collapse)Author
2021-05-04Fix -Wundef warnings for HAVE_RB_EXT_RACTOR_SAFEBenoit Daloze
* See [Feature #17752] Notes: Merged: https://github.com/ruby/ruby/pull/4428
2021-04-27Fix Monitor to lock per Fiber, like Mutex [Bug #17827]Benoit Daloze
2021-04-13dependency updates卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/4371
2021-01-05Fix a typo [ci skip]Kazuhiro NISHIYAMA
2020-12-20ext/monitor is ractor-safeKoichi Sasada
2020-08-27sed -i '/rmodule.h/d'卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3347
2020-08-27sed -i '/r_cast.h/d'卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3346
2020-08-27sed -i '\,2/extern.h,d'卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3338
2020-07-28Use https instead of httpKazuhiro NISHIYAMA
2020-07-17Fix MonitorMixin when the super's initialize has kwargsMasataka Pocke Kuwabara
Notes: Merged: https://github.com/ruby/ruby/pull/3310
2020-05-11sed -i 's|ruby/impl|ruby/internal|'卜部昌平
To fix build failures. Notes: Merged: https://github.com/ruby/ruby/pull/3079
2020-05-11sed -i s|ruby/3|ruby/impl|g卜部昌平
This shall fix compile errors. Notes: Merged: https://github.com/ruby/ruby/pull/3079
2020-04-08Merge pull request #2991 from shyouhei/ruby.h卜部昌平
Split ruby.h Notes: Merged-By: shyouhei <shyouhei@ruby-lang.org>
2020-04-03Fix a typo [ci skip]Kazuhiro NISHIYAMA
2019-12-04new_cond before mon_initializeKoichi Sasada
MonitorMixin#new_cond can be called before mon_initialize, so we need to initialize `@monitor` before it. https://bugs.ruby-lang.org/issues/16255#note-4
2019-11-27Fix documentation of `MonitorMixin#new_cond` [ci skip] (#2707)y-yagi
Since https://github.com/ruby/ruby/pull/2576, `new_cond` uses the Monitor object, not the receiver.
2019-11-12Monitor#exit: check monitor ownership.Koichi Sasada
Monitor#exit should be called by only onwer Thread. However, there is not check for it.
2019-10-20Native MonitorMixin::ConditionVariable#waitKoichi Sasada
MonitorMixin::ConditionVariable#wait can be interrupted just after Monitor#exit_for_cond. So implementation in C.
2019-10-20delegate synchronize methodKoichi Sasada
Delegate MonitorMixin#synchronize body to Monitor#synchronize. It makes guarantee interrupt safe (because Monitor#synchronize is written in C). I thought Ruby implementation is also safe, but I got stuck failure <http://ci.rvm.jp/results/trunk_test@P895/2327639> so that I introduce this fix to guarantee interrupt safe.
2019-10-20make monitor.so for performance. (#2576)Koichi Sasada
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>