Using thread-specific storage to avoid read locks.