Using non-thread-safe libraries — When
making calls to libraries which are not known to be specifically
thread-safe, a locking scheme needs to be provided by the application,
For example, non-thread-safe routines 1 and 2 make a call to routine
A (also non-thread-safe), if routines 1 and 2 use different mutexes
to lock their calls to routine A, then routines 1 and 2 can both
get into routine A at the same time (violating the programmer's
attempt to make the calls thread-safe).