Results 1 to 7 of 7

Thread: [.NET, Serious] Is cross-threading necessarily a bad thing?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2006
    Posts
    247

    [.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?



  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339

    Re: [.NET, Serious] Is cross-threading necessarily a bad thing?

    Why is it illegal? Why can't you cross-thread legally?

  4. #4
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [.NET, Serious] Is cross-threading necessarily a bad thing?

    Why would you need to perform illegal cross-threading?
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  5. #5
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    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.

  6. #6
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: [.NET, Serious] Is cross-threading necessarily a bad thing?

    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)
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  7. #7
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width