Novel concept, use a re-entrant lock since I call a function inside the lock that requires the lock….