Use SemaphoreSlim to limit producer async calls

From Daniel_Balogh
Also added test for the corresponding change.