Background ops / threading question

Z

Zach

SAY I HAVE THE FOLLOWING HYPOTHETICAL SITUATION:
A file with three fields: a, b, and c .
A form-class with two buttons (one calling a data-entry-class, one calling
an adding-up class).
A form-class with a data-entry routine (a and b to the file).
A non-form-class with an adding-up routine (c in the file = a in the file +
b in the file).

GIVEN
This configuration.
I know how to do the data-entry and the adding up in the file.
I have an inkling of how I should do locking and waiting.

QUESTION
How would I get the adding-up routine running in the back-ground? (I.e, I
want to run through the file doing c = a + b, while I am entering a and b.)
Alternatively, where should I look for leads to the answer of my question?

Many thanks,
Zach.
 
Z

Zach

Earl Damron said:
One possible solution would be to use an asynchronous delegate (AD).
Additional info on these can be found at:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpovrAsynchronousDelegates.asp

You can also explicitly create threads for background processes:

http://www.csharp-station.com/ShowPost.aspx?PostID=5935

I think using the first option is a good idea when you can.

HTH
Thank you,
I have downloaded them and will have a look.
Zach.
 
Z

Zach

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top