Project

General

Profile

Actions

Feature #4326

closed

Fiber should respond to call() and []

Added by tenderlovemaking (Aaron Patterson) almost 14 years ago. Updated over 12 years ago.

Status:
Closed
Target version:
-
[ruby-core:34861]

Description

=begin
Fibers are considered to be coroutines. Knuth says "Subroutines are special cases of ... coroutines". This makes sense to me.

Method, Proc, and lambda respond to call and []. If Fiber also responded to call and [], we could use coroutines in places where we use lambdas, procs, and methods.

I've attached a patch that implements the two methods.
=end


Files

fiber.patch (997 Bytes) fiber.patch tenderlovemaking (Aaron Patterson), 01/26/2011 04:08 PM
fiber.patch (853 Bytes) fiber.patch tenderlovemaking (Aaron Patterson), 01/31/2011 08:42 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0