http://qs1969.pair.com?node_id=351374


in reply to Coroutines in Perl

Marc Lehmann has written Coro, a module that introduces coroutines and cooperative multitasking to Perl 5. I have toyed with it, as I find cooperative multitasking much more convenient than threading for most applications where operations can be made nonblocking for Perl.

He used the coroutines to drive a high throughput http daemon, but I found in the module versions I used, that Perl crashed unexpectedly from time to time without any indications as to what caused the crash.

But it sure is fun to program with coroutines, as creating a parallel version of LWP was really easy and nice with it.

Replies are listed 'Best First'.
Coro on OSX (was Re: Re: Coroutines in Perl)
by merlyn (Sage) on May 07, 2004 at 10:09 UTC
    Oooh, I started salivating when staring at Coro, but alas, it fails to "make test" on OSX, even after horking around a bit with the possible configuration options.

    Anyone have a clue about how to get it to work on OSX?

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.


    update: Yes, 5.8.4 (snapshot), and OSX 10.3.3.
      It looks interesting. I may give it a shot this weekend, depending on the weather. (I'm in the process of fixing up a house that needs a little TLC, so my free time isn't what it could be.)

      I'll assume that you are on the latest and greatest version of Panther, running the latest and great 5.8.x ...

      --
      tbone1, YAPS (Yet Another Perl Schlub)
      And remember, if he succeeds, so what.
      - Chick McGee

      Hmmm.... This appears to be a problem with your perl. I am running 10.3.3 with perl 5.8.3. If I use setjump/longjump, the tests run successfully (whether or not I enable context sharing). Does Apple's perl 5.8.1RC3 work?

        Yep. Apple's perl 5.8.1RC3 works (setjump/longjump,context sharing). I'm happy, now I get to play.