curiouswebster
asked on
Considering going multi-threaded
So far I have not written a multi-threaded application in C# but really need to do so. I am wondering how significant this will be when it comes saving data in ArrayLists? I have heard the term "thread safe lists" but do not know what this means. Can more than one thread perform operations on a list at the same time?
How about if a thread should crash or lock up. Can another thread restart that thread? Does multi threading make a program more stable?
Curious.
Thanks,
newbieweb
How about if a thread should crash or lock up. Can another thread restart that thread? Does multi threading make a program more stable?
Curious.
Thanks,
newbieweb
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
threads interact by sending each other signals in some way (maybe blocking each other or doing other things like raising events or even sending a message to the other thread). With a GUI yes it would make it more responsive but you also have to do alot of work with these types of threads as UI controls can only be touched from the main thread.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
simplifies but not when you are talking about a large app with many tasks.
You are correct. I should not have stated my own opinion, which only invited an equally inept opinion. From the help files:
The BackgroundWorker class allows you to run an operation on a separate, dedicated thread. Time-consuming operations like downloads and database transactions can cause your user interface (UI) to seem as though it has stopped responding while they are running. When you want a responsive UI and you are faced with long delays associated with such operations, the BackgroundWorker class provides a convenient solution.
The BackgroundWorker class allows you to run an operation on a separate, dedicated thread. Time-consuming operations like downloads and database transactions can cause your user interface (UI) to seem as though it has stopped responding while they are running. When you want a responsive UI and you are faced with long delays associated with such operations, the BackgroundWorker class provides a convenient solution.
ASKER
How do threads interact with each other? Maybe I could get one thread for the GUI and another thread for the behind the scenes processes.