private async UniTaskVoid WaitForChannelAsync(int consumerId, IUniTaskAsyncEnumerable <string> enumerable, CancellationToken cancellationToken) { try { await enumerable.ForEachAsync(x => Debug.Log("Consumer" + consumerId + ":" + x), cancellationToken); } catch (Exception e) { Debug.LogException(e); } }
private async UniTaskVoid WaitForChannelAsync(IUniTaskAsyncEnumerable <int> reader, CancellationToken token) { try { await reader // IUniTaskAsyncEnumerable<int> .ForEachAsync(x => Debug.Log(x), token); Debug.Log("Done"); } catch (Exception e) { Debug.LogException(e); } }