From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <2ca3dd7d4095c2b41138ab023a0a56e8@vitanuova.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] Channel casting From: rog@vitanuova.com In-Reply-To: <3ECBC538.5090608@ameritech.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Wed, 21 May 2003 19:50:01 +0100 Topicbox-Message-UUID: b6f80040-eacb-11e9-9e20-41e7f4b1d025 > What I was mainly worried about was timing. > If one thread sends a request, but, another > thread preempts that first thread's call to > recv, wont the second thread receive the > server thread's response? there's no problem if the server is single threaded and only serves one request at a time. the problem you speak of can only happen if two threads are both trying to recv at the same time, but that can't happen if clients always write before they read (and the channels are synchronous), as all the clients will queue up to write to request, and the server lets them through one at a time, sending the reply back before it lets the next one in. try modelling it in spin...