PC Review


Reply
Thread Tools Rate Thread

multiple tasks

 
 
=?Utf-8?B?bXZkZXZudWxs?=
Guest
Posts: n/a
 
      22nd Feb 2005
hey all

i have the following code:

private string Test()
{
....
for (int i=0; i<=j; i++)
{
return DoSomething(i);
}
....
}

private string DoSomething(int i)
{
....stuff here takes awhile to process using processinfo (cmd.exe)...
}

what i want to do is do run DoSomething for each i without having to wait
for the previous i to complete.

so for (int i=0; i<=j; i++) { return
SomethingWithoutWaitingForThisToComplete(i); }

how do i do that?
 
Reply With Quote
 
 
 
 
NuTcAsE
Guest
Posts: n/a
 
      22nd Feb 2005
Use ThreadPool to queue async threads to DoSomething. See

http://msdn.microsoft.com/library/de...ogthrepool.asp

NuTcAsE

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tasks in Scheduled Tasks won't load =?Utf-8?B?U2hsb21weQ==?= Windows XP General 14 14th Sep 2005 05:21 PM
cd writing tasks/file and folder tasks =?Utf-8?B?anBy?= Windows XP General 0 15th May 2005 04:20 PM
Missed tasks in Scheduled Tasks -- Not!! Pete Angelakos Windows XP General 1 4th Mar 2005 03:21 PM
Picture Tasks vs File and Folder Tasks S. Thomas Lewis Windows XP Help 1 28th Oct 2004 12:31 AM
Video Tasks to Picture Tasks on Hard drive BEK Windows XP Photos 5 20th Feb 2004 02:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:07 PM.