Click here to Skip to main content
15,893,161 members
Home / Discussions / C#
   

C#

 
AnswerRe: Question about a TextBox with the MultiLine property set to True Pin
mav.northwind21-Feb-08 6:01
mav.northwind21-Feb-08 6:01 
GeneralRe: Question about a TextBox with the MultiLine property set to True Pin
blakey40421-Feb-08 6:10
blakey40421-Feb-08 6:10 
GeneralBinary numbers Pin
Vodstok21-Feb-08 5:05
Vodstok21-Feb-08 5:05 
GeneralRe: Binary numbers Pin
J4amieC21-Feb-08 5:18
J4amieC21-Feb-08 5:18 
GeneralRe: Binary numbers Pin
PIEBALDconsult21-Feb-08 5:40
mvePIEBALDconsult21-Feb-08 5:40 
GeneralSettings for a Win Form Pin
dany_ch21-Feb-08 4:11
dany_ch21-Feb-08 4:11 
GeneralRe: Settings for a Win Form Pin
Judah Gabriel Himango21-Feb-08 4:50
sponsorJudah Gabriel Himango21-Feb-08 4:50 
GeneralThread problem. Pin
pubududilena21-Feb-08 1:23
pubududilena21-Feb-08 1:23 
Hi All,

I need to run 3 methods parallaly.Then I have used Threading for that. Here is the code.

public void threadtest()
{
Thread SpecialThread = new Thread(new ThreadStart(this.GetSpecial));
Thread BulkThread = new Thread(new ThreadStart(this.GetBulk));
Thread NormalThread = new Thread(new ThreadStart(this.GetNormal));

SpecialThread.Start();
BulkThread.Start();
NormalThread.Start();

SpecialThread.Join();
BulkThread.Join();
NormalThread.Join();


while((NormalThread.ThreadState==System.Threading.ThreadState.Running) ||
(BulkThread.ThreadState==System.Threading.ThreadState.Running) ||
(SpecialThread.ThreadState==System.Threading.ThreadState.Running)
)

{
}

}

But most of time one or two threads are going to aborted or something happen and I loose their results.Sometimes this worked properly and I can get all results from 3 methods.

Can any one correct this code?
GeneralRe: Thread problem. Pin
phannon8621-Feb-08 2:49
professionalphannon8621-Feb-08 2:49 
GeneralRe: Thread problem. Pin
Le centriste21-Feb-08 6:06
Le centriste21-Feb-08 6:06 
GeneralRe: Thread problem. Pin
Martin#21-Feb-08 4:56
Martin#21-Feb-08 4:56 
GeneralRe: Thread problem. Pin
pubududilena22-Feb-08 23:37
pubududilena22-Feb-08 23:37 
GeneralRe: Thread problem. Pin
mav.northwind21-Feb-08 5:02
mav.northwind21-Feb-08 5:02 
GeneralRe: Thread problem. Pin
Le centriste21-Feb-08 6:14
Le centriste21-Feb-08 6:14 
GeneralRe: Thread problem. Pin
pubududilena22-Feb-08 23:43
pubududilena22-Feb-08 23:43 
Generalsuppressing/deactivating all other applications when one application is running using C# or VB.Net Pin
Raheem MA21-Feb-08 0:57
Raheem MA21-Feb-08 0:57 
GeneralRe: suppressing/deactivating all other applications when one application is running using C# or VB.Net Pin
Colin Angus Mackay21-Feb-08 1:39
Colin Angus Mackay21-Feb-08 1:39 
GeneralRe: suppressing/deactivating all other applications when one application is running using C# or VB.Net Pin
Raheem MA21-Feb-08 1:57
Raheem MA21-Feb-08 1:57 
GeneralRe: suppressing/deactivating all other applications when one application is running using C# or VB.Net Pin
Dave Kreskowiak21-Feb-08 5:25
mveDave Kreskowiak21-Feb-08 5:25 
GeneralRe: suppressing/deactivating all other applications when one application is running using C# or VB.Net Pin
PIEBALDconsult21-Feb-08 6:23
mvePIEBALDconsult21-Feb-08 6:23 
GeneralRe: suppressing/deactivating all other applications when one application is running using C# or VB.Net Pin
Raheem MA21-Feb-08 17:35
Raheem MA21-Feb-08 17:35 
GeneralRe: suppressing/deactivating all other applications when one application is running using C# or VB.Net Pin
Pete O'Hanlon21-Feb-08 22:56
mvePete O'Hanlon21-Feb-08 22:56 
GeneralRe: suppressing/deactivating all other applications when one application is running using C# or VB.Net Pin
PIEBALDconsult23-Feb-08 4:23
mvePIEBALDconsult23-Feb-08 4:23 
GeneralRe: suppressing/deactivating all other applications when one application is running using C# or VB.Net Pin
Raheem MA19-Feb-09 2:05
Raheem MA19-Feb-09 2:05 
GeneralRe: suppressing/deactivating all other applications when one application is running using C# or VB.Net Pin
PIEBALDconsult19-Feb-09 3:07
mvePIEBALDconsult19-Feb-09 3:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.