Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds two new methods reset(), and throwInto(). Both will throw exceptions into a yielding fiber, however reset() will take care of catching the thrown exception and gracefully returning. throwInto() will likely throw your exception right back out. reset() can be used in cases where infinite loop generators are used extensively. Leaving destruction of those fibers to v8 is generally inefficient. throwInto() could be used to notify a fiber that you don't care about its task anymore. This also defers unwinding of orphaned fibers until after garbage collection has finished. This greatly increases the speed at which orphaned fibers are collected.
- Loading branch information