[fpc-pascal] Re: WSAGetLastError returns 0 when it shouldn't but I cannot see why

L L at z505.com
Thu Feb 28 18:05:20 CET 2008

 > This seriously worries me, since I use threads extensively, and I 
mostly use call by value
 > parameters.

> Bye
> --
> Luca

I use CONST parameters wherever possible for strings.. so that:
1) if I ever port the code to a DLL it is safer (can cast pchar in)
2) const is a stricter contract
3) performance (ha,  premature optimization, by val could be faster sometimes)

As for threads.. I hate them. Wherever there is an alternative solution, I use it. Even if the compiler is working okay, threads still suck. For example I don't give a hoot about a threaded ISAPI server being supposedly more performance oriented than CGI - as if performance makes a difference when the program with threads is buggy. A performance friendly buggy program is about as useless as a demented cheetah that smashes into trees every 3 meters. However, with Sockets programming and blocking sockets... threads are unfortunately one known way of handling the blocking socket.. so.. what to do. LNet? Dunno, Haven't tried it much.. have to try it sometime though ;-)

More information about the fpc-pascal mailing list