Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: 2 streams in a method ?

$
0
0
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?

Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>