i want to know how it is possible to wait for a work to done and then continue and create new one

```
while(!stop)
{
    CreateWork();
    waitForWorkToDone();
}

```

wait must not block calling thread
how i can achive this?