Thread-safe BTC routines