Thread Timing Issues (Debug/Release)
-
Can someone recommend a good resource on resolving thread timing issues? I'm having an issue with a value that doesn't get set "quickly enough" in the debug version, but the release version works nicely. -- I've killed again, haven't I?
-
Can someone recommend a good resource on resolving thread timing issues? I'm having an issue with a value that doesn't get set "quickly enough" in the debug version, but the release version works nicely. -- I've killed again, haven't I?
You have to make sure that the value really is set before you try to use it. To be more specific is hard without knowing anything about what you are trying to do. The problem has nothing to do with timing, though, but the sharing of data between threads. The code shouldn't rely on one thread being ahead of the other, as that is very unpredictable. Be most grateful that you found this bug already, though. You say that the release version works nicely, but I'm not so sure of that. Perhaps that also fails, only not so often. --- b { font-weight: normal; }
-
Can someone recommend a good resource on resolving thread timing issues? I'm having an issue with a value that doesn't get set "quickly enough" in the debug version, but the release version works nicely. -- I've killed again, haven't I?
I think I can speak for all of us when I say "Huh?" What do you "timing issue"? If you're trying to keep two threads in sync, you'll have to use some kind of synchronization mechinism. You absolutely cannot trust that two threads are going to run at exactly the same speed on every machine, let alone run after run on the same machine, or even under slightly differing conditions, like you've already discovered. Off the top of my head, I'm guessing you'll have to implement some kind of "checkpoint" system, depending on what these threads are doing, where each checkpoint will only release when both threads make it to the same point. The down side of this is a lock condition where a thread waits forever for the other thread to get to the checkpoint, but the other thread has failed and aborted for some reason. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
I think I can speak for all of us when I say "Huh?" What do you "timing issue"? If you're trying to keep two threads in sync, you'll have to use some kind of synchronization mechinism. You absolutely cannot trust that two threads are going to run at exactly the same speed on every machine, let alone run after run on the same machine, or even under slightly differing conditions, like you've already discovered. Off the top of my head, I'm guessing you'll have to implement some kind of "checkpoint" system, depending on what these threads are doing, where each checkpoint will only release when both threads make it to the same point. The down side of this is a lock condition where a thread waits forever for the other thread to get to the checkpoint, but the other thread has failed and aborted for some reason. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Dave Kreskowiak wrote:
What do you "timing issue"?
I speak for myself when I say, "Huh?" :laugh: Never mind the unanswered question; I've solved the issue. -- I've killed again, haven't I?
-
I think I can speak for all of us when I say "Huh?" What do you "timing issue"? If you're trying to keep two threads in sync, you'll have to use some kind of synchronization mechinism. You absolutely cannot trust that two threads are going to run at exactly the same speed on every machine, let alone run after run on the same machine, or even under slightly differing conditions, like you've already discovered. Off the top of my head, I'm guessing you'll have to implement some kind of "checkpoint" system, depending on what these threads are doing, where each checkpoint will only release when both threads make it to the same point. The down side of this is a lock condition where a thread waits forever for the other thread to get to the checkpoint, but the other thread has failed and aborted for some reason. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Dave Kreskowiak wrote:
I think I can speak for all of us when I say "Huh?"
Hits the spot exactly... :) You know where this originates from? To my knowledge it's actually a quote from a Buffy the vampire slayer episode... :laugh: mav
-
Dave Kreskowiak wrote:
I think I can speak for all of us when I say "Huh?"
Hits the spot exactly... :) You know where this originates from? To my knowledge it's actually a quote from a Buffy the vampire slayer episode... :laugh: mav
Yeah, I realized that after I posted it. A commerical for Buffy reruns came on about a half-hour later! RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome