resource_yield test: fix race condition