Making the dictionary adapter thread-safe across all platforms; closes #394