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

13 Коммитов

Автор SHA1 Сообщение Дата
Koichi Sasada d247dedade Ractor.yield should raise if out-port is closed
Ractor.yield should raise Ractor::ClosedError if current Ractor's
outgoing-port is closed.
2020-09-25 12:53:58 +09:00
Koichi Sasada 5286526346 frozen T_OBJECT can be shareable.
If an T_OBJECT object is frozen and all ivars are shareable,
the object should be shareable.
2020-09-25 12:52:53 +09:00
Koichi Sasada 7ad3aff48d Ractor#close_outgoping cancel Ractor.yield
Ractor#close_outgoing should cancel waiting Ractor.yield. However,
yield a value by the Ractor's block should not cancel (to recognize
terminating Ractor, introduce rb_ractor_t::yield_atexit flag).
2020-09-25 00:25:38 +09:00
Koichi Sasada 29ed16ff4a add GC_GUARD
We observed mark miss on this point so we add RB_GC_GUARD() to
avoid wrong free.
2020-09-24 17:09:12 +09:00
Quang-Minh Nguyen 398da71175 Validate name during initialization 2020-09-20 23:10:44 +09:00
Nobuyoshi Nakada 702cebf104
strip trailing spaces [ci skip] 2020-09-19 17:40:54 +09:00
Koichi Sasada b416a76402 add debug log on enabling multi-ractor mode 2020-09-18 14:17:49 +09:00
Koichi Sasada f7ccb8dd88 restart Ractor.select on intterupt
signal can interrupt Ractor.select, but if there is no exception,
Ractor.select should restart automatically.
2020-09-15 00:04:59 +09:00
Kazuhiro NISHIYAMA 776b3df490
Fix typos [ci skip] 2020-09-06 01:58:44 +09:00
Nobuyoshi Nakada d164eef957
Fixed heap-use-after-free on racter 2020-09-04 15:17:42 +09:00
Koichi Sasada 3b0bcaf287 check multi_ractor mode at main_p
rb_ractor_main_p() need to access to the ractor pointer in TLS.
However it is slow operation so that we need to skip this check
if it is not multi-ractor mode (!ruby_multi_ractor).

This performance regression is pointed at
https://bugs.ruby-lang.org/issues/17100#note-27
2020-09-04 14:18:48 +09:00
Nobuyoshi Nakada 169b1d1aca
Initialize loop variables of list_for_each for MS VC 2020-09-04 11:46:50 +09:00
Koichi Sasada 79df14c04b Introduce Ractor mechanism for parallel execution
This commit introduces Ractor mechanism to run Ruby program in
parallel. See doc/ractor.md for more details about Ractor.
See ticket [Feature #17100] to see the implementation details
and discussions.

[Feature #17100]

This commit does not complete the implementation. You can find
many bugs on using Ractor. Also the specification will be changed
so that this feature is experimental. You will see a warning when
you make the first Ractor with `Ractor.new`.

I hope this feature can help programmers from thread-safety issues.
2020-09-03 21:11:06 +09:00