[.NET, Serious] Is cross-threading necessarily a bad thing?
I am working on an application that HAS to use an "illegal" cross thread for one of it's extremely important features to work. So far I have noticed no insecurities, no memory leaking, or anything that could jeopardize my project.
So is cross-threading necessarily a bad thing?
Re: [.NET, Serious] Is cross-threading necessarily a bad thing?
Depends on what it does, and whether you really have no choice but to do this. I'm wondering if it is an architectural flaw. Or just sheer necessity, which makes it an interesting task, whatever it is that makes you use htat.
Re: [.NET, Serious] Is cross-threading necessarily a bad thing?
Why is it illegal? Why can't you cross-thread legally?
Re: [.NET, Serious] Is cross-threading necessarily a bad thing?
Why would you need to perform illegal cross-threading?
Re: [.NET, Serious] Is cross-threading necessarily a bad thing?
Quote:
Originally Posted by Seraphino
I am working on an application that HAS to use an "illegal" cross thread for one of it's extremely important features to work...
What exactly would that be?
Anyway, I would agree with mendhak about the flaw in your system architecture.
Re: [.NET, Serious] Is cross-threading necessarily a bad thing?
Quote:
Why is it illegal? Why can't you cross-thread legally?
Threads take time slices, so lets say a thread starts working and before it stores the results to the memory the system stops that thread and starts another one which also uses the same memory variable.
When the first thread returns to work it will save changes it made to the original value of that variable which causes a loss of data (changes made by the second thread)
Re: [.NET, Serious] Is cross-threading necessarily a bad thing?
Quote:
Originally Posted by Atheist
Why would you need to perform illegal cross-threading?
Thank you that is what I was trying to ask.
Its really not a lot of work to perform the same operation safely so why not do it right.