Re: Multithread safety

Alexander Nickolov wrote:
> That is of course true. Scalability at least is unimportant for
> clients,

I used to think so too but now I am not so sure. Once upon a time a client
meant a desktop application that occasionally grabbed some info from server.
Now I find "clients" simultaneously opening few dozen connections for
various purposes. At some point the number of threads in the client becomes
too big.

> however, whereas portability might be important.
> While I agree the code won't be 100% platform independent,
> it's much easier to port code based on puire BSD APIs than
> one based on the extended WinSock functions and concepts.

This is true but up to a point. There are two kinds of porting: tweaking
existing code with #ifdefs or providing a new implementation of a
"networking layer". Sticking to BSD helps with the first way but this
approach is flawed to begin with. It is fast in the beginning but very hard
to maintain. It also forces you to the lowest common denominator everywhere
(not just with sockets). Using the second way you are not constarained to
BSD. In my experience I found it easier to abstract the "networking layer"
and re-wrtie it for each platform group. But then I only had to support
Windows-Unix portability.

> Then again, portability is not important for a lot of folks anyway...

Yeah. Especially to the "client" folks.