When using async. server inserts are asynchronous, so wait for the inserts to finish before checking if sampling can be done.
When using async. server inserts are asynchronous, so wait for the inserts to finish before checking if sampling can be done.

PiperOrigin-RevId: 388397382
Change-Id: I58a2a7f4be75b3eda727ee1777870e35681c0958

deepmind/reverb,deepmind/reverb,deepmind/reverb,deepmind/reverb