[profiler] Fix usage of the lock-free queue API.