Async processing?

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

Hello,

I am sort of new to this aspect of .NET so please forgive me if that's a FAQ.

I have a Windows Form that has to perform a lengthy operation when the user clicks a button.
While the operation is in process, the user will not be able to do anything else from the UI but I still want the UI to pump messages (so it can be moved, etc.)

What is the best way to implement it in C#?

Thank you.


Best wishes,
Alex.
 
Alex said:
I am sort of new to this aspect of .NET so please forgive me if that's a FAQ.

I have a Windows Form that has to perform a lengthy operation when the user clicks a button.
While the operation is in process, the user will not be able to do
anything else from the UI but I still want the UI to pump messages
(so it can be moved, etc.)

What is the best way to implement it in C#?

See http://www.pobox.com/~skeet/csharp/threads
and particularly
http://www.pobox.com/~skeet/csharp/threads/winforms.shtml
 
Hello Jon Skeet [C# MVP],

Do u think it helps him ;)
Let's play high and suggest him to read smth like this http://www.amazon.com/exec/obidos/A...78857/sr=11-1/ref=sr_11_1/103-0383773-8813403


:)

J> See http://www.pobox.com/~skeet/csharp/threads
J> and particularly
J> http://www.pobox.com/~skeet/csharp/threads/winforms.shtml


---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
Michael Nemtsev said:
Do u think it helps him ;)

Yes, I suspect so. It's certainly helped plenty of other people get to
grips with threading.
Let's play high and suggest him to read smth like this
http://www.amazon.com/exec/obidos/ASIN/1861008295/qid=1127378
857/sr%3D11-1/ref%3Dsr%5F11%5F1/103-0383773-8813403

I don't see why - you don't need to use a book to learn threading. I
certainly didn't.

If the OP has any further questions, he can always ask them here.
 
Hello Jon Skeet [C# MVP],
J> Yes, I suspect so. It's certainly helped plenty of other people get
J> to grips with threading.

agree
J> I don't see why - you don't need to use a book to learn threading. I
J> certainly didn't.

Just to give him source where he can extend his knowlege, coz multitreading
is a vast area.
I take a position that each of use beside just practice should read a couple
books to get basis

J>
J> If the OP has any further questions, he can always ask them here.

Thats why we are here

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsch
 
Michael Nemtsev said:
J> I don't see why - you don't need to use a book to learn threading. I
J> certainly didn't.

Just to give him source where he can extend his knowlege, coz multitreading
is a vast area.
I take a position that each of use beside just practice should read a couple
books to get basis

Personally I think it's worth trying it with the aid of tutorials and
pages such as mine before spending money on books. It could well be
that there's enough information there for everything the OP wants.
 
Hello Jon,

Jon Skeet said:
Yes, I suspect so. It's certainly helped plenty of other people get to
grips with threading.


I don't see why - you don't need to use a book to learn threading. I
certainly didn't.

If the OP has any further questions, he can always ask them here.

Just a quick explanation.

I am familiar with threading but not with their implementation in the ..NET framework.
Most of my threading experience is under Win32.

The link is helpful but I would like some more insight about the benefits and drawbacks of each method.


Best wishes,
Alex.
 
Alex said:
Just a quick explanation.

I am familiar with threading but not with their implementation in the .NET framework.
Most of my threading experience is under Win32.

The link is helpful but I would like some more insight about the
benefits and drawbacks of each method.

What do you mean by "each method" in this case? What alternatives are
you considering?
 
Hello Jon Skeet [C# MVP],

Maybe he is interesting how is interruption queue and clock interrups realised
in unmanaged code?
J> What do you mean by "each method" in this case? What alternatives are
J> you considering?

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
Michael Nemtsev said:
Maybe he is interesting how is interruption queue and clock interrups realised
in unmanaged code?

Perhaps - I guess we'll have to wait for the detailed questions to know
for sure :)
 
Hi Alex,

Does the community's replies make sense to you? We can not explain each
Thread methods here, I think MSDN has give us a lot of details usage of the
thread methods. If you want to know more details about these methods, maybe
Reflector is your friend. You can use Reflector to view .Net thread methods
source code.

If you have any more concern, I suggest you post some more concrete
question here, so that we can give a concrete answer.

Thanks for your understanding.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top