Quote Originally Posted by Angus View Post
It does by every definition of thread-safe that's been thrown at me. Foo() cannot be called again until it is finished, and the same criteria applies to goo(). If the definition were extended to imply that nothing else that isn't thread-safe can be trusted to run while foo() and goo() are running, that would be different, but that's not what I've been hearing.
Then you are one of the few people I've run into who has (mis) interpretted the definition in that way. A function is thread safe if it can tolerate multiple, simultaneous invokations. These "foo" and "goo" functions can't.

It's not always that simple. This came up because I have these 2 close source libraries that I want to run concurrently. Unfortunately, neither appear to be thread-safe by any definition, so I've had to chuck all my threading code and go for a multi-process solution. It wouldn't make sense to put any reentrant wrapper around the library calls, since that would in effect make execution serial.
Yes, it sucks. Modern general-use libraries should be thread-safe.