Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
epoll() vs select() story
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
Prenj
n00b
n00b


Joined: 20 Nov 2011
Posts: 10

PostPosted: Mon Nov 26, 2012 9:04 pm    Post subject: epoll() vs select() story Reply with quote

Two competing restaurant franchises: Epoll vs Select.

Customer ID walks into Epoll. Walks to the counter, looks at the menu, and the personnel behind the desk ask him to epoll_create() his order. He orders hamburgers, and starts to modify his order via epoll_ctl(), picks some sallad on a side, and some mineral water. He gets his his buzzer with his number on (epfd), and is told to please pick a seat and epoll_wait().

Kitchen staff makes the burger, the guy behind the counter checks the list of orders, spots ID's order, adds the sallad and the drink, and punches the number of ID's buzzer and activates it.

ID was surfing the web, and answering e-mail's on his phone, when the buzzer rang. He calmly wakes out if his epoll_wait(), goes to the counter and gets his burger. Walking back to his table, he notices that everybody is having good time talking, fiddling with phones, reading newspapers and watching a game on TV while epoll_waiting().



Meanwhile, at Select restaurants, it's packed with sweaty anxious customers, all converged on the counter, yelling over and over on top of each others heads "Yo, waiter, is my cheeseburger done?!!" "How about now, is it done now?!" "Yo!? Man this restaurant sucks, I get exhausted waiting for my food!".


In case you wondered why epoll() scales better :)
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2025
Location: Germany

PostPosted: Mon Nov 26, 2012 9:23 pm    Post subject: Reply with quote

drunk? on Monday?
_________________
AidanJT wrote:

Libertardian denial of reality is wholly unimpressive and unconvincing, and simply serves to demonstrate what a bunch of delusional fools they all are.

Satan's got perfectly toned abs and rocks a c-cup.
Back to top
View user's profile Send private message
Prenj
n00b
n00b


Joined: 20 Nov 2011
Posts: 10

PostPosted: Mon Nov 26, 2012 9:31 pm    Post subject: Reply with quote

energyman76b wrote:
drunk? on Monday?


Monday is just a construct :)
Back to top
View user's profile Send private message
notageek
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jun 2008
Posts: 107
Location: Bangalore, India

PostPosted: Tue Nov 27, 2012 1:33 am    Post subject: Reply with quote

There is no Monday.

(For BK and others, this is a reference to "there is no spoon" from Matrix. And for your benefit I have provided a link for its explanation.)
_________________
What looks like a cat, flies like a bat, brays like a donkey, and plays like a monkey?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum