Resolve "Add possibility to get integers" #17
@ -150,13 +150,15 @@ public sealed class MultiChannelRng<TNum> : IRandom<TNum>, IDisposable where TNu
|
|||||||
#region Implementation of IDisposable
|
#region Implementation of IDisposable
|
||||||
|
|
||||||
private void StopProducer() => this.producerTokenSource.Cancel();
|
private void StopProducer() => this.producerTokenSource.Cancel();
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
public void Dispose() => this.StopProducer();
|
public void Dispose() => this.StopProducer();
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Implementation of IRandom<TNum>
|
#region Implementation of IRandom<TNum>
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
public TNum GetUniform(CancellationToken cancel = default)
|
public TNum GetUniform(CancellationToken cancel = default)
|
||||||
{
|
{
|
||||||
var valueTask = this.channelFloats.Reader.ReadAsync(cancel);
|
var valueTask = this.channelFloats.Reader.ReadAsync(cancel);
|
||||||
|
Loading…
Reference in New Issue
Block a user