on-topic-content:

The first larger program using coroutines is now doing "mission
critical" work (failure == loss of relatively unimportant data). It's
my news-scanner which scans ~60 servers at the same time. It's just as
fast (600k/s is where the network tops out), requires only slightly more
memory (about 44mb instead of 43) and runs since a day without any issues,
despite it's heavy use of closures and a coroutine for every connection
(which made the desing SOO much nicer).

And in the meantime I wonder why Event isn't used so much. I'd count it as
THE standard event api, but as other people already mentioned, almost no
standard modules use it.

(OTOH, people are eager to have threads so they can do all the wonderful
things java does with threads, like one thread per gui-button or one
thread per network socket :*)

slightly off-topic-content:

On Mon, Jul 16, 2001 at 11:37:39PM -0400, Uri Guttman <[EMAIL PROTECTED]> wrote:
> good luck there. the regex engine is not reentrant

I know that there are still some issues with reentrancy in 5.6, but these
should all be solved in 5.7 or 5.8. If there are remaining issues these
are bugs, so they will eventually be solved.

> nor easily saved for a coroutine.

Yes, globals... But I don't aim for completeness ;*) The only problem
was indeed that CV's are being modified when called, something which the
threads (and ithreads) folks have even bigger problems with. I don't think
the current model makes sense. Well, I aslo don't think threads will make
sense with perl5 ever ;)

> perl6 will be making the regex system generate regular perl ops so the
> engine will be thread safe and yieldable.

yet another improvement.

> i feel this will be impossible to debug fully with perl5 but i laud your
> effort.

It's not that bad, actually. The problem is the padlist, which is
pre-allocated and needs to be cloned. If pp_entersub would do that on demand
(rather than crashing when it doesn't exist), like it does for threads it
would not be that bad at all. Of course the design is wrong ;)

> you might want to talk with p5p and the guy (sky) who is doing
> all the ithread work.

Yepp, ithreads are conceptually the same as coroutines. However they have
a much larger impact on the system than Coro.

> when you finish, put some of your energy toward perl6 (maybe the new
> event loop and op code loop).

Eventually I will, but at the moment I wouldn't touch the perl6 crowd
with a ten feet pole. The last time I tried to convince them that
automatic normalization of unicode is a security bug (imho) it resulted
in... great artistic brain storming but no results ;) I am very very
skeptic. Especially the idea of throwing away CPAN is not something I am
very fond of ;)

-- 
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       [EMAIL PROTECTED]      |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |

Reply via email to