replace isink.h with (hopefully) thread-safe approach