473,396 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Async processing?

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"
Nov 17 '05 #1
11 1620
Alex <in******@online.nospam> 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 - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #2
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
Nov 17 '05 #3
Michael Nemtsev <ne*****@msn.com> 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 - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #4
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 Nietzsche
Nov 17 '05 #5
Michael Nemtsev <ne*****@msn.com> 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 - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #6
Michael Nemtsev <ne*****@msn.com> 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.
Nov 17 '05 #7
Hello Jon,

Jon Skeet [C# MVP] <sk***@pobox.com> wrote:
Michael Nemtsev <ne*****@msn.com> 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"
Nov 17 '05 #8
Alex <in******@online.nospam> 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 - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #9
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
Nov 17 '05 #10
Michael Nemtsev <ne*****@msn.com> wrote:
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 :)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #11
Hi Alex,

I have added a reply to you in microsoft.public.dotnet.framework newsgroup.
Please follow up there. Thanks

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.

Nov 17 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Passynkov, Vadim | last post by:
I am using Asynchronous Query Processing interface from libpq library. And I got some strange results on Solaris My test select query is 'SELECT * from pg_user;' and I use select system...
8
by: MuZZy | last post by:
Hi, Could someone pls help me here: If i use async sockets in the separate thread like this: void ThreadFunction() { ..... 1. MySocket.BeginAccept(AsyncCallBack(OnConnectRequest),...
8
by: TS | last post by:
Im in a web page and call an asynchronous method in business class. the call back method is in the web page. When page processes, it runs thru code begins invoking the method then the page...
2
by: Viet | last post by:
I have a couple of questions that hopefully someone could clarify for me. I have an app that uses the threading.timer to constantly poll a scanner to scan in documents. I understand that Async...
1
by: Simon Hart | last post by:
Hi, I thought I'd just open a thread in an attempt to get peoples feelers with regards to multithreading vs Async Web Service processing. Of course Web Services makes it easy to do Async...
0
by: Manfred Braun | last post by:
Hi All, I have a problem reading queue-messages async. My QueueReader has a Start() and a Stop() method and if my app starts, it calls Start(). The problem is, that there are possibly several...
6
by: gabriel.landais | last post by:
Hi, I'm currently building a parser class in JS and I have a question about variables. I retrieve XML data and then process it. After that, I process a result array (mydataarray). It looks like...
6
by: Shak | last post by:
Hi all, Three questions really: 1) The async call to the networkstream's endread() (or even endxxx() in general) blocks. Async calls are made on the threadpool - aren't we advised not to...
0
by: koredump | last post by:
Hi all, I have a windows app that makes some asyc calls to my webservice (WSE 3.0 with MTOM). exception gets thrown in the client win app. I know this exception is caused on the async...
10
by: Frankie | last post by:
It appears that System.Random would provide an acceptable means through which to generate a unique value used to identify multiple/concurrent asynchronous tasks. The usage of the value under...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.