playlist example: fix race condition