|
-
Jan 2nd, 2015, 07:33 PM
#1
Thread Starter
New Member
Need Simple Async/Await Progress Bar Example
I've found multiple examples of using Async/Await, but they are either using web page downloading or file downloading as the asynchronous or blocking method being called. In the examples the progress bar is then called and updated for each string (or object returned) from the web page or complete file returned. I am trying to call a method that takes ~5 seconds to execute and while this is occurring, be separately updating a progress bar on ~0.5 second intervals. Can anyone steer me in the direction where I could find a similar example?
-
Jan 2nd, 2015, 07:59 PM
#2
Re: Need Simple Async/Await Progress Bar Example
You should use multi threading for this instead. Just use a thread pool instead.
-
Jan 3rd, 2015, 01:11 PM
#3
Thread Starter
New Member
Re: Need Simple Async/Await Progress Bar Example
Thank you for the suggestion. I had first considered using a separate thread or helper function, but subsequent research recommended against either option and using the Async approach instead. It was considered less problematic, less complicated and well suited this scenario. I'm hoping to keep the solution simpler as it doesn't warrant complexity -- it's a nicety for the user, but this isn't a commercial application.
-
Jan 3rd, 2015, 05:52 PM
#4
Re: Need Simple Async/Await Progress Bar Example
Hello,
Look at the first link in my signature for an example that uses Async/await includes a progress bar. All the work is done in a class project called from a Forms project.
-
Jan 3rd, 2015, 06:37 PM
#5
Thread Starter
New Member
Re: Need Simple Async/Await Progress Bar Example
Hi Kevininstructor,
Thank you for responding to my problem. The example referred to that came the closest, that I found using a progress label, was Asynchronous demos for read/write files using Async and Await for VS2012 or high. This example was in the Asynchronous demos for read/write files.... Just wanted to confirm that was what you meant so I don't off on a wild goose chase.
-
Jan 3rd, 2015, 06:42 PM
#6
Re: Need Simple Async/Await Progress Bar Example
Both projects would be good to learn from and for the record both were done as there are not many decent examples other than the web downloads as you have found out.
-
Jan 4th, 2015, 02:47 PM
#7
Thread Starter
New Member
Re: Need Simple Async/Await Progress Bar Example
Great! Thanks for the help, I'll dive in to them.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|