Thread worker library with management