aboutsummaryrefslogtreecommitdiffstats
path: root/ext/monitor/lib
Commit message (Collapse)AuthorAgeFilesLines
* Use https instead of httpKazuhiro NISHIYAMA2020-07-281-1/+1
|
* Fix MonitorMixin when the super's initialize has kwargsMasataka Pocke Kuwabara2020-07-171-1/+1
|
* Fix a typo [ci skip]Kazuhiro NISHIYAMA2020-04-031-1/+1
|
* new_cond before mon_initializeKoichi Sasada2019-12-041-2/+10
| | | | | | | 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
* Fix documentation of `MonitorMixin#new_cond` [ci skip] (#2707)y-yagi2019-11-271-1/+1
| | | | Since https://github.com/ruby/ruby/pull/2576, `new_cond` uses the Monitor object, not the receiver.
* Native MonitorMixin::ConditionVariable#waitKoichi Sasada2019-10-201-7/+1
| | | | | MonitorMixin::ConditionVariable#wait can be interrupted just after Monitor#exit_for_cond. So implementation in C.
* delegate synchronize methodKoichi Sasada2019-10-201-6/+1
| | | | | | | | 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.
* make monitor.so for performance. (#2576)Koichi Sasada2019-10-201-0/+287
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.