socket read timeout
Hendrik van Rooyen
mail at microcorp.co.za
Mon Apr 2 01:56:23 EDT 2007
"Bryan Olson" <fakeaddress at nowhere.org> wrote:
> Steve Holden wrote:
> > Hendrik van Rooyen wrote:
> >> Are sockets full duplex?
> >>
> > Yes. But you have to use non-blocking calls in your application to use
> > them as full-duplex in your code.
>
> Hmmm... I'm missing something. Suppose I have one thread (or
> process) reading from a blocking-mode socket while another is
> writing to it? What stops it from being full duplex?
>
Elsewhere in this thread I wrote about my experience with a serial port,
where I can show that the "file handler" only does the write once the
blocking read completes - and the point at issue is if sockets are the same.
We regularly get questions about "my stuff does not come out" on
the group, and I wondered whether this effect is the underlying cause.
But I don't know about the sockets case, which is why I asked.
You raise an interesting point about a different process - my serial
experience is using threads. I have never tried mixing processes
on a serial port. Haven't a clue if its possible, or if the behaviour
will be different.
- Hendrik
More information about the Python-list
mailing list