2 streams in a method ?

Feb 4, 2014 at 2:36 AM
Is it ok to run 2 streams at the same time in the same method

the method is
private void BackgroundWorkerOnDoWork(object sender, DoWorkEventArgs doWorkEventArgs)
 stream.StartStream(token, tweet =>

                    foreach (var NewsSource in File.ReadLines(ConfigurationManager.AppSettings["Path_To_Text_File"]))
                        if (tweet.Creator.ScreenName == NewsSource)

                            backgroundWorker.ReportProgress(++nbTweetDetected, tweet);
                    return !backgroundWorker.CancellationPending;
so currently i have just this one filtered stream running, it stores keywords in a text file (not shown) and tweet creators in another text file. I want to add another separate stream.StartStream(token, tweet => function to the same method. Is this ok or will twitter have a problem with that?
Feb 4, 2014 at 11:06 AM

You should not be able to do this anymore with FilteredStream but I will verify this for you.

The expected behavior based on twitter documentation is that when starting a filtered stream with the same credentials, the new stream should start but the old one should get closed.

Feb 5, 2014 at 10:00 PM
Hi sorry for the long delay.

I have verified and you cannot run 2 FilteredStream simultaneously.

Marked as answer by linvi on 2/6/2014 at 3:26 AM