From: Simon Wright <simon@pushface.org>
Subject: Re: tasksing and TCP sockets
Date: Tue, 31 Jan 2006 21:55:57 +0000
Date: 2006-01-31T21:55:57+00:00 [thread overview]
Message-ID: <m2irs0awpe.fsf@grendel.local> (raw)
In-Reply-To: hwc5kuyeybnx.3pauwgv4ee44.dlg@40tude.net
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
> On 30 Jan 2006 14:12:51 -0800, Rolf wrote:
>> - I don't know much about sockets (or better I don't remember much).
>> Does a waiting read (in the second task) block a write in the first
>> task?
>
> Usually not. Note that you must wait not for a socket read, but for a
> "variable-update" event from the middleware layer.
_Something_ has to wait for a socket read! If you're writing your own
'middleware' (lower layers, anyway) that will be you.
Windows is not wonderful for this sort of thing but I have not seen
problems of the sort you describe with a task blocked on the read
(input_t'Input) and other code (either another single task, or some
sort of mutex) for output_t'Output.
>> - what other hints can you give me?
>
> Never ever use UPD, avoid TCP_NO_DELAY with TCP/IP. The first is
> unreliable for your purpose, the second quickly brings the network
> down.
Probably best to avoid these (I guess that UPD was a typo for UDP) at
the start, but sometimes they are the appropriate solution. Not often,
maybe.
next prev parent reply other threads:[~2006-01-31 21:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-30 22:12 tasksing and TCP sockets Rolf
2006-01-31 2:40 ` Stephen Leake
2006-01-31 6:59 ` tmoran
2006-01-31 23:03 ` Rolf
2006-02-01 1:26 ` Stephen Leake
2006-02-01 7:39 ` Rolf
2006-02-01 14:52 ` Stephen Leake
2006-02-03 20:33 ` Rolf
2006-02-04 12:48 ` Stephen Leake
2006-02-06 5:02 ` Dave Thompson
2006-01-31 22:52 ` Rolf
2006-02-01 1:23 ` Stephen Leake
2006-02-01 21:12 ` Simon Wright
2006-01-31 3:02 ` Steve
2006-01-31 10:09 ` Dmitry A. Kazakov
2006-01-31 21:55 ` Simon Wright [this message]
2006-02-01 8:54 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox