New topic: thread management help
<http://forums.realsoftware.com/viewtopic.php?t=45874> Page 1 of 1 [ 3 posts ] Previous topic | Next topic Author Message tpolson Post subject: thread management helpPosted: Mon Nov 12, 2012 1:11 am Joined: Fri Oct 07, 2005 11:03 pm Posts: 35 i am doing a threaded file transfer app and i need some help understanding how to manage the number of concurrent transfer threads. i want to have a maximum number concurrent threads for example 10. if have a file list that is 100 files long, i want 10 to start and as each thread finishes i want the next file in the list to start. any help is greatly appreciated. Top timhare Post subject: Re: thread management helpPosted: Mon Nov 12, 2012 1:46 am Joined: Fri Jan 06, 2006 3:21 pm Posts: 11795 Location: Portland, OR USA RB threads are cooperative and therefore do not utilize multiple cores. They all run sequentially on a single core, alternating processing time. So adding threads actually increases overhead and slows your app down. I don't think you would gain much from this approach. That said, you can maintain an array of thread objects. As each one finishes, it notifies a controller object that starts the next thread. Top J.Hansen Post subject: Re: thread management helpPosted: Mon Nov 12, 2012 3:41 am Joined: Wed Dec 14, 2011 4:20 am Posts: 62 tpolson wrote:i am doing a threaded file transfer app and i need some help understanding how to manage the number of concurrent transfer threads. i want to have a maximum number concurrent threads for example 10. if have a file list that is 100 files long, i want 10 to start and as each thread finishes i want the next file in the list to start. any help is greatly appreciated. Maybe this can be useful for you: http://www.rbdeveloper.com/browse/9.3/9308/ (Multiprocessing with REAL Studio) Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 3 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
