Updated for new threadstore API calls.