Sam Hobbs
posted
154 posts
since
Sep 07, 2009
from
|
|
Re: C# instance (of a class) and threading or BackgroundWorker
|
|
|
|
Posted on:
11/7/2009 3:03:01 PM
|
|
|
|
|
|
|
|
|
You say your "class has many functions"; what determines what executed when? Does the class execute the various member functions or do the need to be executed from outside the thrad?
|
|
|
|
|
|
Elina
posted
3 posts
since
Nov 07, 2009
from
|
|
Re: C# instance (of a class) and threading or BackgroundWorker
|
|
|
|
Posted on:
11/7/2009 3:09:22 PM
|
|
|
|
|
|
|
|
|
Yes, the class has many methods. And the class itself executes all the methods from within itself.
The class does not talk to the window which is Form1, that is done by a thread which polls the classes for new messages (if instance[0].messageQueue.Count > 0) in that fashion
so they are independent, and independet from eachother as well
just need them to run simultaneously so I don't need to run multiple copies of the software
|
|
|
|
|
|
Sam Hobbs
posted
154 posts
since
Sep 07, 2009
from
|
|
Re: C# instance (of a class) and threading or BackgroundWorker
|
|
|
|
Posted on:
11/7/2009 3:35:39 PM
|
|
|
|
|
|
|
|
|
Sorry, I still don't understand what you need to do; I hope others do.
|
|
|
|
|
|
Elina
posted
3 posts
since
Nov 07, 2009
from
|
|
Re: C# instance (of a class) and threading or BackgroundWorker
|
|
|
|
Posted on:
11/7/2009 4:02:52 PM
|
|
|
|
|
|
|
|
|
well, I have multiple instances of a class
currently they run after each other
I need them to run with each other, at the same time
|
|
|
|
|
|
Danatas Gervi
posted
194 posts
since
Jul 28, 2009
from
|
|
Re: C# instance (of a class) and threading or BackgroundWorker
|
|
|
|
Posted on:
11/8/2009 3:23:50 AM
|
|
|
|
|
|
|
|
How many instances of classes
do you have?
|
|
|
|
|
|
Sam Hobbs
posted
154 posts
since
Sep 07, 2009
from
|
|
Re: C# instance (of a class) and threading or BackgroundWorker
|
|
|
|
Posted on:
11/8/2009 6:30:43 PM
|
|
|
|
|
|
|
|
|
Yes, that is what asychronous means. I understood that part.
|
|
|
|
|
|