Comments (4)
We'll look into this
from alpakka.
@to11mtm was this related to your fix or something else?
from alpakka.
@Aaronontheweb based on the info, I don't think this is related to my changes in #1068; those were on the Sink
side and this appears to be Source
side.
I would suggest considering the following, if one is worried about races in the if logic of the Source
:
public override void OnPull()
{
if (_reader.TryRead(out var element))
{
Push(_outlet, element);
}
else
{
var continuation = _reader.WaitToReadAsync();
if (continuation.IsCompletedSuccessfully)
{
var dataAvailable = continuation.GetAwaiter().GetResult();
if (dataAvailable && _reader.TryRead(out element))
Push(_outlet, element);
else
CompleteStage();
}
else
{
continuation.AsTask().ContinueWith(t =>
{
if (t.IsFaulted) _onValueReadFailure(t.Exception);
else if (t.IsCanceled) _onValueReadFailure(new TaskCanceledException(t));
else _onValueRead(t.Result);
});
}
}
}
Fault cases should be fairly infrequent, so just using the continuation every time should be OK.
from alpakka.
hi, I can confirm that the suggested code change helped with my issue, and everything is working as expected, thanks for the help
from alpakka.
Related Issues (20)
- Merge `Akka.Streams.Azure.EventHub.V5` into `Akka.Streams.Azure.EventHub`
- QueueSource does not remove processed messages from the Azure Storage Queue HOT 3
- Please indicate that the Azure Storage Queue Stream consumer is to delete consumed messages from the Azure Queue HOT 2
- IndexOutOfRangeException happens when trying to get the queue message HOT 3
- Akka.Streams.Azure.EventHub.V5 batching processing not working as expected
- Use Akka.net as SignalR Backplane
- NullReferenceException - when using Akka.Net v1.5.12 and Akka.Streams.Amqp.RabbitMq v1.5.8 HOT 3
- Add nightly build support HOT 3
- Remove Alpakka Channel Stages
- Add nats-net-v2 Connectors
- Simplify build system
- Amqp Connector don't work with RestartSource HOT 11
- Manual commit Azure EventHub source feature
- DockerClient.Images.ListImagesAsync() could not use MatchName anymore.
- Flaky tests when transient error/delay happens HOT 1
- Need to migrate SignalR.Core packages to Microsoft.AspNet.SignalR HOT 2
- More frequent releases HOT 2
- Akka.Streams.EventHubs uses a deprecated Azure SDK (WindowsAzure.ServiceBus 6.2.0) HOT 11
- [Docs] need to explain when to use Akka.Streams.RabbitMQ vs Akka.Streams.AMQP HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alpakka.