PC Review


Reply
Thread Tools Rate Thread

Async processing?

 
 
Alex
Guest
Posts: n/a
 
      22nd Sep 2005
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.

--
Address email to user "response" at domain "alexoren" with suffix "com"
 
Reply With Quote
 
 
 
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      22nd Sep 2005
Alex <(E-Mail Removed)> wrote:
> 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/t...winforms.shtml

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
Michael Nemtsev
Guest
Posts: n/a
 
      22nd Sep 2005
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/AS...383773-8813403




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


J> See http://www.pobox.com/~skeet/csharp/threads
J> and particularly
J> http://www.pobox.com/~skeet/csharp/t...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


 
Reply With Quote
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      22nd Sep 2005
Michael Nemtsev <(E-Mail Removed)> wrote:
> 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/AS.../qid%3D1127378
> 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.

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
Michael Nemtsev
Guest
Posts: n/a
 
      22nd Sep 2005
Hello Jon Skeet [C# MVP],

>> Do u think it helps him

J> Yes, I suspect so. It's certainly helped plenty of other people get
J> to grips with threading.

agree

>> Let's play high and suggest him to read smth like this
>> http://www.amazon.com/exec/obidos/AS.../qid%3D1127378
>> 857/sr%3D11-1/ref%3Dsr%5F11%5F1/103-0383773-8813403

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


 
Reply With Quote
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      22nd Sep 2005
Michael Nemtsev <(E-Mail Removed)> wrote:
> >> Let's play high and suggest him to read smth like this
> >> http://www.amazon.com/exec/obidos/AS.../qid%3D1127378
> >> 857/sr%3D11-1/ref%3Dsr%5F11%5F1/103-0383773-8813403

> 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.

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
Cool Guy
Guest
Posts: n/a
 
      23rd Sep 2005
Michael Nemtsev <(E-Mail Removed)> wrote:

> Let's play high and suggest him to read smth like this
> http://www.amazon.com/exec/obidos/AS...383773-8813403


I was considering buying that book but Amazon.co.uk only lists one buying
option - a used copy at 120 GBP! That's 215 USD according to XE.com.

Had a quick look at a couple of other (UK) sites and apparently it's out of
print.
 
Reply With Quote
 
Alex
Guest
Posts: n/a
 
      23rd Sep 2005
Hello Jon,

Jon Skeet [C# MVP] <(E-Mail Removed)> wrote:
> Michael Nemtsev <(E-Mail Removed)> wrote:
>> 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/AS.../qid%3D1127378
>> 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.


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.

--
Address email to user "response" at domain "alexoren" with suffix "com"
 
Reply With Quote
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      23rd Sep 2005
Alex <(E-Mail Removed)> wrote:
> 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?

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
Michael Nemtsev
Guest
Posts: n/a
 
      23rd Sep 2005
Hello Jon Skeet [C# MVP],

Maybe he is interesting how is interruption queue and clock interrups realised
in unmanaged code?

>> 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.
>>

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


 
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
Connect without async but get timeout error when async=true Joseph Microsoft ADO .NET 5 16th Jul 2008 10:13 PM
writing an async client (sockets/async/thread) asharda@woh.rr.com Microsoft C# .NET 8 17th Mar 2008 10:04 PM
Any harm in using Async=true to sql server 2005 for non-async db calls Chris Becker Microsoft ADO .NET 1 23rd Mar 2007 12:18 AM
Async processing? Alex Microsoft Dot NET Framework 11 28th Sep 2005 07:04 AM
Async processing? Alex Microsoft Dot NET Framework Forms 4 23rd Sep 2005 04:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:17 PM.