Closed danielrozo closed 11 years ago
Hi Daniel
Firstly thanks for giving it a whirl!
Question: have you tried:
userStream.TimeLine.ObserveOn(SynchronizationContext.Current).Subscribe(t => anaylzeTweet(t));
As a mechanism for ensuring the subscriber returns to the correct Thread (assuming it is the UI thread)? This might also save the await dispatcher... in your analyzeTweet method
As another test, can you make the signature of the analyzeTweet to something like
private async Task analyzeTweet(Tweet t)
Thans for the quick reply!
Just tried your suggestions, and yes the .ObserveOn saves the dispatcher (currently just testing/exploring the package so it's UI thread). That said, the one tweet delay is still there
FIXED in 1.0.5
My error. With the userstreams (and searchstreams) ... if you leave on gzip/deflate the server will hold over data (a packet) before sending. Turn it off, and all is well.
In the midst of all the shenanigans, I also managed to cleanup my code, add more Rx and fix some other bugs. So it was a worthwhile experience.
Don't know if this is my implementation or it's a know issue. For example:
Works well, but it'll only add a tweet/mention when another tweet is recieved from the stream, not directly the one just recieved, so it's a 1 tweet delay. I'd bet on my code having some issue, but can't tell which.