Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^3: Signals vs. Windows

by nikosv (Chaplain)
on Oct 04, 2012 at 10:47 UTC ( #997218=note: print w/replies, xml ) Need Help??

in reply to Re^2: Signals vs. Windows
in thread Signals vs. Windows

I see,so you mean that the child thread can't poll. What if he combines polling the event with non blocking IO ?

Replies are listed 'Best First'.
Re^4: Signals vs. Windows
by BrowserUk (Pope) on Oct 04, 2012 at 11:46 UTC
    What if he combines polling the event with non blocking IO ?

    That is certainly an option, but once you move to non-blocking IO and polling, a simple shared variable transitioning from false to true is far simpler than a kernel-based event mechanism.

    The problem with non-blocking IO is that you then have manually replicate all the functionality of readline, eof etc. in user code which is a retrograde step. Especially when there are simpler ways.

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    RIP Neil Armstrong

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997218]
[ambrus]: "you are far more likely to be squished between two other dudes" => wait, really? aren't most planes, weighted by people traveling on it, so narrow that there are only two or three seats on each side of the one corridor, so only one third of the people ge
[ambrus]: t squished between two other people?
holli is about to take the first hit since a month and this weed is strong shit. Should my head explode, someone call 911.
[ambrus]: And even when I traveled on a big plane for a long flight, it had 3 seats, then corridor, then 4 seats, then corridor, then 3 seats, so less than half of the people sit between two other dudes.

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2017-12-18 13:39 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (486 votes). Check out past polls.