Running multiple awaited Tasks in order

I am creating an app that requires to execute multiple awaited tasks in order or else the out come is disastrous.
This current method executes all awaited task almost at the same time. Sometimes the Speech synthesizer runs before the stream is finished being generated or even before the rss feeder data is finished loading.
here is my code
private async void RSSreader()
SyndicationClient client = new SyndicationClient();
Uri feedUri = new Uri("http://api.breakingnews.com/api/v1/item/?format=rss");
feed = await client.RetrieveFeedAsync(feedUri);
foreach (SyndicationItem item in feed.Items)
RSSFEEDBOX.Text = RSSFEEDBOX.Text + "\n" + item.Title.Text + ".";
// Read Text From Text Box RSSFEEDBOX
stream = await Sn.SynthesizeTextToStreamAsync(RSSFEEDBOX.Text);
TextPlayer.SetSource(stream, stream.ContentType);
TextPlayer.MediaEnded += TextPlayer_MediaEnded;
TextPlayer.Play();
Rogelio Rios

The problem is that you have used 'async void'. You should not use 'async void' for methods/functions.
Change your method's signature to:
private async Task RSSReader()
And of course this method should be called asynchronously.
I'm a self-taught noob amateur. Please take this into account when responding to my posts or when taking advice from me.

Similar Messages

  • Running multiple DAQ tasks at the same time

    I am trying to setup a program that would allow me to run different analog voltage waveforms on different channels.
    The rate at which samples hit each channel can be the same for all 32, but I want each to be sourced by an individual file I/O source.
    I saw the multiple tasks thread and I did try doing the multiple task approach first and needless to say got the same error.
    Saw something about software timed approach working better, but it is still a bit unclear in that post. Can i do with this card what I described above and if so is this software timing approach the way to go?
    Thanks in advance!

    Hi,
    What DAQ device and and programming language are you using, i.e., LabVIEW/CVI/.NET?   If you are new to DAQ, a great place to start are the example programs.  You can find the example programs with the Example Finder, located at Help >> Find Examples in both LabVIEW and CVI.  Once this opens, double click Hardware Input and Output >> DAQmx >> Analog Generation.  This will have many programs for generating waveforms.  I have also found a program online that might be worth looking at.  
    Continuous Multiple AO Waveforms
    Regards,
    Jim Schwartz

  • How to run multiple CodedUI Ordered Tests over multiple Test Agents for parallel execution using Test Controller

    we are using VS 2013, I need to run multiple Coded UI Ordered Tests in parallel on different agents.
    My requirement :
    Example:   I have 40 Coded UI Test scripts in single solution/project. i want to run in different OS environments(example 5 OS ).  I have created 5 Ordered tests with the same 40 test cases. 
    I have one Controller machine and 5 test agent machines. Now I want my tests to be distributed in a way that every agent gets 1 Ordered test to execute. 
    Machine_C = Controller (Controls Machine_1,2,3,4,5)
    Machine_1 = Test Agent 1 (Should execute Ordered Test 1 (ex: OS - WIN 7) )
    Machine_2 = Test Agent 2 (Should execute Ordered Test 2 (ex:
    OS - WIN 8) )
    Machine_3 = Test Agent 3 (Should execute Ordered Test 3
    (ex: OS - WIN 2008 server)  )
    Machine_4 = Test Agent 4 (Should execute Ordered Test 4 (ex:
    OS - WIN 2012 server) )
    Machine_5 = Test Agent 5 (Should execute Ordered Test 5 (ex:
    OS - WIN 2003 server) )
    I have changed the  “MinimumTestsPerAgent” app setting value
    as '1' in controller’s configuration file (QTController.exe.config).
    When I run the Ordered tests from the test explorer all Test agent running with each Ordered test and showing the status as running. but with in the 5 Test Agents only 2 Agents executing the test cases remaining all 3 agents not executing the test cases but
    status showing as 'running' still for long time (exp: More then 3 hr) after that all so  its not responding. 
    I need to know how I can configure my controller or how I can tell it to execute these tests in parallel on different test agents. This will help me reducing the script execution time. 
     I am not sure what steps I am missing. 
    It will be of great help if someone can guide me how this can be achieved.
    -- > One more thing Can I Run one Coded UI Ordered Test on One Specific Test Agent?
    ex: Need to run ordered Test 1 in Win 7 OS (Test Agent 1) only.
    Thanks in Advance.

    Hi Divakar,
    Thank you for posting in MSDN forum.
    As far as I know, we cannot specify coded UI ordered test run on specific test agent. And it is mainly that test controller determine which coded UI ordered test assign to which test agent.
    Generally, I know that if we want to run multiple CodedUI Ordered Tests over multiple Test Agents for parallel execution using Test Controller.
    We will need to change the MinimumTestsPerAgent property to 1 in the test controller configuration file (QTControllerConfig.exe.config) as you said.
    And then we will need to change the bucketSize number of tests/number of machines in the test settings.
    For more information about how to set this bucketSize value, please refer the following blog.
    http://blogs.msdn.com/b/aseemb/archive/2010/08/11/how-to-run-automated-tests-on-different-machines-in-parallel.aspx
    You can refer this Jack's suggestion to run your coded UI ordered test in lab Environment or load test.
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/661e73da-5a08-4c9b-8e5a-fc08c5962783/run-different-codedui-tests-simultaneously-on-different-test-agents-from-a-single-test-controller?forum=vstest
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Cisco Agent Desktop software running multiple times in Task Manager

    Has anyone seen an issue with Cisco Agent Desktop v 6.6(1) where after closing the program completely it stays running in Windows Task Manager. We have the Agent software installed on 8 PCs and only one of them is having this happen to them. One time the PC had 15 instances of Agent.exe running in Task manager. A reboot of the PC corrected the issue, however when the issue does happen her chat box within the Agent software shows as Initializing and the agent's name appears and reappears on the Supervisor Desktop software.
    If anyone needs any other info as to the versions we're using or anything else please let me know. I have searched all over the net for a solution and haven't found anything. My next step is to do a TAC case, but I wanted to post something here to see what responses I got.
    Thanks,
    Nick

    Hi Nick,
    Check this bug:
    http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&bugId=CSCtd75811
    Multiple Agent.exe Instances Created Causing CAD Agent to Disappear.
    Regards
    Gurpreet

  • SSIS execute single SQL Task for running multiple SQL statements on TeraData DB connection

    Hi,
    I need to run multiple statements in TeraData connection ("Go" command between the statements is not recognized). how can I execute 1 SQL task referring to those multi statements? I'm using file connection as well. all the statements located in a single
    file.
    I'm working with SSIS 2008, TERADATA 12.0.
     Thanks

    sure.
    create winbatch file (*.bat).
    in batch file set that command:
    bteq < scriptfilePath.txt (or .bteq)> LogsFolderPathOutputfile.out
    scriptfile should contain:
    .logon
    Server/user, pswd
    your script.
    if you want to set error handeling points, set the followings between yor command statements:
    .IF ERRORCODE <> 0 THEN .GOTO SqlError;
    at the end of script, set:
    -- Log successful completion
    .LOGOFF;.QUIT 0;
    .LABEL SqlError.QUIT ERRORLEVEL;
    you can view logs at the outputfile you stated above.
    enjoy.

  • Does running multiple tasks on the multifunction DAQ card cuase any problems ?

    Dear all,
    I woul like to use the 6024E card for running atleast 3 tasks simultaneously, does it cause any problem ?
    Any software issues?
    I have a 3.0 GhHz HT processor with 256 MB Ram.
    Any issues with labview ?

    Satya,
    Increasing RAM will always help. Especially since you are running with only 256 MB RAM, for any type of work now days I would recommend 512 MB, if not 1GB. Now if you are getting LabVIEW to crash with a minimal application going this may indicate other problems. If you have a memory leak in your program, that could cause a crash and with 256 MB of RAM you will see a crash sooner, but it can still happen even with 512MB or 1GB. So double check for any memory leaks. Minimize the number of programs running in the back ground. If LabVIEW crashes with any kind of error, that would give us a good indication what is going on.
    -GDE

  • Help with running multiple threads

    I'm new to programming with threads. I want to know how to run
    multiple threads at the same time. Particularly for making games
    in Java which I'm also begining to learn. For running multiple
    threads at the same time, do you have to put two run() methods
    in the source? If not then how do you make two threads or more
    run at the same time?
    Thanks for helping.

    For running multiple
    threads at the same time, do you have to put two run()
    methods
    in the source? Hi there,
    Each thread is presumably performing a task. You may be performing the same task multiple times or be performing different tasks at once. Either way, each task would typically be contained within the run() method of a class. This class would either be a subclass of java.lang.Thread (extends Thread) or would be an implementation of java.lang.Runnable (implements Runnable). In either case, you would define a method with signature (public void run()...). The difference comes into play when you wish to actually perform one of these tasks. With a subclass of Thread, you would simply perform:
    new MyTask().start();
    With an implementation of Runnable, you would do this:
    new Thread(new MyTask()).start();
    This assumes you don't need to monitor the threads, won't be sending any messages to your tasks or any such thing. If that were the case, you would need to tuck away those returns to new MyTask() for later access.
    In order to launch two threads simultaneously, you would have something along the lines of:
    new MyTask().start();
    new MyOtherTask().start();
    Now it is perfectly possible that MyTask() would complete before MyOtherTask() managed to start in which case it wouldn't appear as if you had actually had multiple threads running, but for non-trivial tasks, the two will likely overlap. And of course, in a game, these tasks would likely be launched in response to user input, which means that you wouldn't have any control over when or in what order they executed.
    Anyhow, it's as simple as that. You should also consider following the Java Threading trail which shows a simple example of using multiple threads. You can find it at:
    http://java.sun.com/docs/books/tutorial/essential/threads/index.html
    Regards,
    Lynn

  • How can I run multiple midlets in parallel via the raspberry pi cmd line interface?

    I am trying to run multiple midlets at the same time on my raspberry pi.
    From netbeans point of view I am able to deploy and run them. But for my applications I want to auto start multiple midlets on the raspberry pi.
    On the cmd line interface of java me 8 I have commands to install a midlet and run a midlet.
    But i am not able to start multiple midlets.
    Can someone explain to me how I can do this?

    Hi!
    Could you please clarify a bit: do you want auto-start behavior of your applications or be able to start them manually via CLI?
    Because "auto start" means that applications are started by Java once you start Java itself and in order to make it happen you shall mark your applications appropriately (check MEEP spec for "MIDlet-<n>-Type" application attribute value "autostart"). If this is the case, have you added this attribute?
    If you want to run them manually you should be ale to do so via CLI just the same way as you start one application (via "ams-run" command).
    Either way, could you also please clarify what are the symptoms of the problem? E.g. on CLI what are the messages you receive back (if start is unsuccessful what is the error message etc).
    In addition please mind that there is limit on number of simultaneous VM tasks. If I'm not mistaken by default it is 6: 2 of them are used by system code and each running MIDlet consumes 1 VM task. If you want to increase it please change the value of "MAX_ISOLATES" property in jwc_properties.ini file. The maximum supported value is 16
    Regards,
    Andrey

  • I switched on my PC and there was an update for realplayer. Since then firefox will not load. It is running according to Task Manager. I've downloaded a another copy of the programme using IE but whilst it loaded as a programme, does not open a window.

    I switched on my PC and there was an update for realplayer. Since then firefox will not open as a window. It is running according to Task Manager. I've downloaded a another copy of the programme using IE but whilst it loaded as a programme, does not open a window.

    Hi again,
    Helps if I give the correct link ! <br/>The press shift button appears to still work, but the option to start in safe mode from the programs listing of a standard install I do not think exists anymore.
    Safe mode will start from a command line, (or a shortcut) and in some circumstances you may need to enter the full path name on a command or shortcut detailed instructions are at http://kb.mozillazine.org/Safe_mode
    Remember (at least at this stage) do not make changes when you get the options list, just click on the continue button.
    If you think that RealPlayer is causing the problem you could uninstall that for now.
    Firefox recent versions are 3.6 4.0 (and 5.0 in beta). There is some debate as to whether creating new profiles or re-installing Firefox is the simplest method of troubleshooting and solving some of these problems, personally I use multiple profiles and multiple versions of Firefox, and tend to forget the required procedures are less than straightforward. For now at least try [[safe mode]] again.
    * see also Instructions for [[installing a previous version of firefox]]

  • PowerShell using start job to run multiple code blocks at the same time

    I will be working with many 1000’s of names in a list preforming multiple function on each name for test labs.
    I notice when it is running the functions on each name I am using almost no CPU or memory.  That led me to research can I run multiple threads at once in a PowerShell program. That lead me to articles suggesting start-job would do just want I am looking
    for. 
    As a test I put this together.  It is a simple action as an exercise to see if this is indeed the best approach.  However it appears to me as if it is still only running the actions on one name at a time.
    Is there a way to run multiple blocks of code at once?
    Thanks
    Start-Job {
    $csv1 = (Import-Csv "C:\Copy AD to test Lab\data\Usergroups1.csv").username
    foreach ($name1 in $csv1) { Write-Output "Job1 $name1"}
    Start-Job {
    $csv2 = (Import-Csv "C:\Copy AD to test Lab\data\Usergroups2.csv").username
    foreach ($name2 in $csv2) { Write-Output " Job2 $name2"}
    Get-Job | Receive-Job
    Lishron

    You say your testing shows that you are using very little cpu or memory in processing each name, which suggests that processing a single name is a relatively trivial task.  
    You need to understand that using a background job is going to spin up another instance of powershell, and if you're going to do that per name what used to require a relatively insignificant amount of memory is going to take around 60 MB.  
    Background jobs are not really well suited for multi-threading short-running, trivial tasks.  The overhead of setting up and tearing down the job session can be more than the task itself.
    Background jobs are good for long-running tasks.  For multi-threading short, trivial tasks runspaces or a workflow would probably be a better choice.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Run Multiple Instances of Windows Store App

    We have a desktop app which we are considering porting to Windows Store. Our app allows the user to generate orders. If the user wishes to generate several orders simultaneously, they open several instances of our app.
    Is it possible to run multiple instances of a Windows Store app on Windows 10?

    Hi,
    Another thread in MSDN forum already answered this question:
    https://social.msdn.microsoft.com/forums/windowsapps/en-us/19b5bd94-d772-46b0-b5af-a1be475b0e16/multiple-instance-in-metro-app
    The app is still single instance, but it can now open multiple windows by calling
    CoreApplication.CreateNewView. This is demonstrated in the
    Multiple Views Sample
    Roger Lu
    TechNet Community Support

  • Error while running multiple Smart Publishing Wizards

    Sorry this is so long....
    When I run multiple publishing wizards (two separate source
    folders to two separate destination folders) I get an error stating
    "The process cannot access the file because it is being used by
    another process." The file is not identified and the result varies.
    I have seen the following because of this error:
    1. The first publishing job completes OK but the second
    wizard has to be restarted.
    2. The first job resets back to the dialog where you click
    Finish to start it and the second continues OK.
    3. The first job resets and the second job errors when it
    gets to the end of the copy.
    I have been just running them one at a time but am now
    maintaining 80+ sites supported by 3 project files and it doesn't
    matter if the Wizards are publishing from different projects. I get
    the same problem if just clicking publish from the Build dialog in
    the RH project. Basically any time two publish jobs are running
    they crash each other.
    I've started to use batch files with xcopy statements to move
    the sites from my C: to the Web server (mapped drive on the
    network). I haven't seen any problems with this approach and I can
    launch as many jobs as I want.
    I would welcome any advice or conjecture as to resolving the
    Wizard problem and any concerns with using the xcopy?

    I also get the problem if from teh same project I generate
    say 4 SSLs then kick off four Smart Publishing Wizards to publish
    each. You can't do this by clicking Publish from the generate
    dialog because RH dedicates itself to the task. So I use the Smart
    Publishing Wizard from the Toolbox.
    I did set up the xcopy to only copy changed files using /D
    parameter. It works well and I was going to write a manager to
    allow me to kick off common groupings of copies with one click and
    a little monitoring app to watch it and let me know when complete.
    Before I did all that I just wanted to see if the wizard
    behavior is normal or if I have a problem that can be
    corrected.

  • Running multiple instances of program in parllel processing.

    Hi Experts...
    We have an issue where we need to update huge set of data (say more than 2000000), update is simple where some BI table needs to be updated for few fields.
    Now issue is that if at one go this update is done then there is memory issue, system is not able to extend the internal table beyond a permitted memory.
    For this there may be some chanes which could be done in report RSMEMORY but business does not want this way.
    I want to know what does "running multiple instances of a program in parllel processing, one job does not have to update the whole table".
    Program is ready but simply running program without any input on the selection screen is picking all data and ending up in a short dump since there is huge data in the BI table.
    What is the best possible way to update table through program where there is an issue of Huge data.
    Do we have any expert comments on this ?
    Thanks & Regards,
    Mark

    Hope this gives some direction !
    Bundling using Function Modules for Updates
    If you call a function module using the statement CALL FUNCTION ... IN UPDATE TASK, the function module is flagged for execution using a special update work process. This means that you can write the Open SQL statements for the database changes in the function module instead of in your program, and call the function module at the point in the program where you would otherwise have included the statements. When you call a function module using the IN UPDATE TASKaddition, it and its interface parameters are stored as a log entry in a special database table called VBLOG.
    http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/content.htm
    Rgds
    Sameer

  • Run Multiple SSIS Packages in parallel using SQL job

    Hi ,
    We have a File Watcher process to determine the load of some files in a particular location. If files are arrived then another package has to be kick-started.
    There are around 10 such File Watcher Processes to look for 10 different categories of files. All 10 File Watcher have to be started at the same time.
    Now these can be automated by creating 10 different SQL jobs which is a safer option. But if a different category file arrives then another job has to be created. Somehow I feel this is not the right approach.
    Another option is to create one more package and execute all the 10 file watcher packages as 10 different execute packages in parallel.
    But incase if they don’t execute in parallel, i.e., if any of the package waits for some resources, then it does not satisfy our functional requirement . I have to be 100% sure that all 10 are getting executed in parallel.
    NOTE: There are 8 logical processors in this server.
    (SELECT cpu_count FROM sys.dm_os_sys_info
    i.e., 10 tasks can run in parallel, but somehow I got a doubt that only 2 are running exactly in parallel and other tasks are waiting. So I just don’t want to try this  option.
    Can someone please help me in giving the better way to automate these 10 file watcher process in a single job.
    Thanks in advance,
    Raksha
    Raksha

    Hi Jim,
    For Each File Type there are separate packages which needs to be run.
    For example package-A, processes FileType-A and package-B processes FileType-B. All these are independent processes which run in parrallel as of now. 
    The current requirement is to have File Watcher process for each of these packages. So now FileWatcher-A polls for FileType-A and if any of the filetype-A is found it will kick start package-A. In the same way there is FileWatcher-B, which looks for FileType-B
    and starts Package-B when any of FileType-B is found. There are 10 such File Watcher processes.
    These File Watcher Processes are independent and needs to start daily at 7 AM and run for 3 hrs. 
    Please let me know if is possible to run multiple packages in parallel using SQL job.
    NOTE: Some how I find it as a risk, to run these packages in parallel using execute package task and call that master package in job. I feel only 2 packages are running in parallel and other packages are waiting for resources.
    Thanks,
    Raksha
    Raksha

  • Restrictions on using multiple user tasks in parallel ?

    Hi there,
    are there any restrictions on creating / managing multiple user tasks sequentially or in parallel in a BPEL process ?
    Sometimes my BPEL engine (OC4J/2.0.11) generates an error about "unregistered object ..." and the BPEL process failes.
    The BPELConsole then is not able to display the process state anymore.
    Thanks,
    Wolfgang

    There should be no restriction on how many task you can run in parallel. The only requirement is to use distinct partnerLinks (the partnerLink is statefull and embedded the correlation information).
    If you are combining flowN and tasks, you can achieve this by using local partnerlink (not supported by the designer but supported by the engine so a local partnerlink can be added to the process using the XML source representation of the BPEL).
    -Edwin

Maybe you are looking for