aboutsummaryrefslogtreecommitdiffstats
path: root/vm_sync.c
Commit message (Collapse)AuthorAgeFilesLines
* sync RClass::ext::iv_index_tblKoichi Sasada2020-10-171-2/+2
| | | | | | | | | | | | iv_index_tbl manages instance variable indexes (ID -> index). This data structure should be synchronized with other ractors so introduce some VM locks. This patch also introduced atomic ivar cache used by set/getinlinecache instructions. To make updating ivar cache (IVC), we changed iv_index_tbl data structure to manage (ID -> entry) and an entry points serial and index. IVC points to this entry so that cache update becomes atomically.
* fix releasing timing.Koichi Sasada2020-10-141-11/+10
| | | | | | | (1) recorded_lock_rec > current_lock_rec should not be occurred on rb_ec_vm_lock_rec_release(). (2) should be release VM lock at EXEC_TAG(), not POP_TAG(). (3) some refactoring.
* support exception when lock_rec > 0Koichi Sasada2020-10-141-0/+22
| | | | | | If a ractor getting a VM lock (monitor) raises an exception, unlock can be skipped. To release VM lock correctly on exception (or other jumps with JUMP_TAG), EC_POP_TAG() releases VM lock.
* relax dependencyKoichi Sasada2020-09-151-3/+1
| | | | vm_sync.h does not need to include vm_core.h and ractor_pub.h.
* Initialize loop variables of list_for_each for MS VCNobuyoshi Nakada2020-09-041-1/+1
|
* Introduce Ractor mechanism for parallel executionKoichi Sasada2020-09-031-0/+250
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.