add tracking for thread create, join and detached exit