Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Coro, EV and cede

by Nick Kostirya (Sexton)
on Apr 08, 2011 at 06:09 UTC ( [id://898267]=note: print w/replies, xml ) Need Help??


in reply to Re: Coro, EV and cede
in thread Coro, EV and cede

I've tried this way at once, but it didn't help.

Probably cede really doesn't give EV control.

Replies are listed 'Best First'.
Re^3: Coro, EV and cede
by ikegami (Patriarch) on Apr 08, 2011 at 17:02 UTC

    Just call sleep instead of cede if it works better.

    But you may want to consider the output I got from different sleep lengths in the second thread. I changed from printing the length to print time().

    Using sleep(0), it takes 9s to do a request. first second second second second second second second second second second second second second second second second 1302281756 second first second second second second second second second second second second second second second second second second second 1302281765 Using sleep(1), it takes 2s to do a request. first second second second 1302281791 first second second 1302281793 first second second 1302281795 Using sleep(2), it takes 1s to do a request. first second 1302281819 first second 1302281820 first second 1302281822 first 1302281823
Re^3: Coro, EV and cede
by ikegami (Patriarch) on Apr 08, 2011 at 15:40 UTC

    It gives control to the coro running EventLoop. But of course, that coro is in the EventLoop call. What about

    async { sleep 60 while 1; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://898267]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-19 13:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found