Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In the Rubinius implementation, every Fiber is actually a separate pthread that is coordinated by the owning Thread object. Passing values from and to the Fiber is mediated by the Thread. Behind both a Thread and a Fiber is a data structure for various information that supports the functioning of the Thread or Fiber. When the underlying pthread function terminates, it sets sets that structure to a "zombie" status so that its resources can eventually be released. In doing so, it removes the reference to the Thread object associated with the Fiber, so we need to cache the last value in the Fiber itself.
- Loading branch information