Subj : Re: Threading and Timeouts To : comp.programming.threads From : Giancarlo Niccolai Date : Thu Jul 21 2005 02:34 am David Schwartz wrote: > > "Giancarlo Niccolai" wrote in message > news:dbmc2p$qne$1@newsread.albacom.net... > >>> Nope, that's not what it says. It talks about operations that >>> *WOULD* >>> not block, not operations that *WILL* not block. In other words, it >>> tells you what would have happened to the operation had it already been >>> in progress, not what will happen in the future. > >> Non sense; there's no meaning in knowing what happened. And: >> >> """ >> A descriptor shall be considered ready for writing when a call to an >> output >> function with O_NONBLOCK clear would not block, whether or not the >> function >> would transfer data successfully. >> """ >> >> Cannot be possibly misunderstood. If you write it WILL NOT BLOCK. > > No, it does not say a *subsequent* operation *will* not block, it says > a > hypothetical concurrent operation *would not* block. These are *totally* > different. Ah, NOW I see your point. You say that there is no guarantee that the socket (let's focus on that) status may not change after that select() has decided it was ready. It may theoretically change also before it returns. Well, supposing the socket is used by more threads/process at a time, without coordination yes. Yet, is this meaningful? How can this impact a correctly written program? Bests, Giancarlo Niccolai. .