Граф коммитов

22 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada ac152b3cac
Update dependencies 2021-11-21 16:21:18 +09:00
Nobuyoshi Nakada 070557afc4 Distinguish signal and timeout [Bug #16608] 2021-07-25 13:09:03 -07:00
Benoit Daloze fa7a712d46 Fix -Wundef warnings for HAVE_RB_EXT_RACTOR_SAFE
* See [Feature #17752]
2021-05-04 14:56:55 +02:00
Benoit Daloze 3a3b19b2bb Fix Monitor to lock per Fiber, like Mutex [Bug #17827] 2021-04-27 18:42:50 +02:00
卜部昌平 6413dc27dc dependency updates 2021-04-13 14:30:21 +09:00
Kazuhiro NISHIYAMA 3d43944725
Fix a typo [ci skip] 2021-01-05 23:10:39 +09:00
Koichi Sasada 846c4b03b8 ext/monitor is ractor-safe 2020-12-20 04:22:29 +09:00
卜部昌平 490010084e sed -i '/rmodule.h/d' 2020-08-27 16:42:06 +09:00
卜部昌平 756403d775 sed -i '/r_cast.h/d' 2020-08-27 15:03:36 +09:00
卜部昌平 0da2a3f1fc sed -i '\,2/extern.h,d' 2020-08-27 14:07:49 +09:00
Kazuhiro NISHIYAMA 946cd6c534
Use https instead of http 2020-07-28 19:51:54 +09:00
Masataka Pocke Kuwabara 8d2333019a Fix MonitorMixin when the super's initialize has kwargs 2020-07-17 16:37:18 -07:00
卜部昌平 9e41a75255 sed -i 's|ruby/impl|ruby/internal|'
To fix build failures.
2020-05-11 09:24:08 +09:00
卜部昌平 d7f4d732c1 sed -i s|ruby/3|ruby/impl|g
This shall fix compile errors.
2020-05-11 09:24:08 +09:00
卜部昌平 9e6e39c351
Merge pull request #2991 from shyouhei/ruby.h
Split ruby.h
2020-04-08 13:28:13 +09:00
Kazuhiro NISHIYAMA 810d66f3e7
Fix a typo [ci skip] 2020-04-03 14:37:28 +09:00
Koichi Sasada c6e3db0c66 new_cond before mon_initialize
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-12-04 13:36:41 +09:00
y-yagi 18953416de Fix documentation of `MonitorMixin#new_cond` [ci skip] (#2707)
Since https://github.com/ruby/ruby/pull/2576,
`new_cond` uses the Monitor object, not the receiver.
2019-11-27 20:24:01 -08:00
Koichi Sasada fd6445b7e8 Monitor#exit: check monitor ownership.
Monitor#exit should be called by only onwer Thread. However, there
is not check for it.
2019-11-12 10:07:45 +09:00
Koichi Sasada a236eaa762 Native MonitorMixin::ConditionVariable#wait
MonitorMixin::ConditionVariable#wait can be interrupted just after
Monitor#exit_for_cond. So implementation in C.
2019-10-20 15:45:30 +09:00
Koichi Sasada a0a3c70181 delegate synchronize method
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-20 14:21:04 +09:00
Koichi Sasada caac5f777a
make monitor.so for performance. (#2576)
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.
2019-10-20 04:52:20 +09:00