Readcallbacks with blocking sockets is not exactly error prone.
/ Per Hedbor ()
Previous text:
2003-03-19 15:47: Subject: I/O callbacks in blocking mode
How would there be a "disastrous hang"? /.../
It has been discussed later on in this thread. I suggest you read it through before responding.
If you want to "protect" the user from shooting himself in the foot, I'd rather suggest a check in the read() function that you don't have a read_callback at the same time as you are manually doing a read(). That would break fewer programs. I still think it would be unnecessary pampering though.
That's a good suggestion. I see it as a good measure to track down bugs more efficiently; in a high level language I don't see any real point in allowing error prone situations just because it would be "pampering" otherwise. That's rather one of the points with high level languages.
/ Martin Stjernholm, Roxen IS