Search:
Type: Posts; User: MrMojoRisin
Search:
Search took 0.03 seconds.
-
June 30th, 2010, 11:05 AM
Hi all,
Thanks for all of the replies. I just tested Lindley's suggestion and it seems to be working fine. As such, although I appreciate the additional suggestions, I'm going to stick with this...
-
June 29th, 2010, 02:24 PM
The producer should wait for the consumers to finish reading the data before overwriting. The consumers should all read the active data at once, then all do some hardware output stuff. Once the...
-
June 29th, 2010, 01:42 PM
Thanks again Lindley for the thorough explanation. I will give the above a try and report back.
@Arjay: no consumer thread actually changes the original data. They are strictly readers. The...
-
June 29th, 2010, 01:16 PM
I tried the bool idea, but it seems with that method my consumer threads do not loop fast enough, as they're waiting on their respective bools. Each thread's loop should take the exact same time due...
-
June 29th, 2010, 10:36 AM
Thanks to both of you for the sound advice.
However, I have one final concern, and I'm sorry for not making it clear earlier: each consumer thread reads the same data (and does different stuff...
-
June 28th, 2010, 09:32 PM
GeoRanger,
Thanks for the reply. I agree with resetting readme_event in my consumer thread, but the issue is, as I stated in my reply to Lindley, I actually have five consumer threads (although...
-
June 28th, 2010, 09:29 PM
Hi Lindley,
Thanks a lot for the quick reply. I see your point about the consumer thread being unbounded until the producer hits ResetEvent. That's one of the things I was considering. Also, I...
-
June 28th, 2010, 08:54 PM
Hi all,
I apologize for the length of the following post, but I've been banging my head against the wall for a couple of weeks trying to figure this out. I would really appreciate any advice that...
-
Thanks all for the replies. I understand it better now.
-
Hi all,
I'm curious as to why one must always declare a pointer to memory on the heap but not to memory on the stack. For example, when I declare something with the "new" keyword, it goes on the...
-
March 10th, 2010, 10:19 AM
What I still find odd is that if I comment out delete evt, leaving delete info in there, the code will execute and exit properly. There will be no errors or crashing. Here's what I mean:
...
-
March 9th, 2010, 07:32 PM
Thanks for the reply. That's exactly right. For some reason I was thinking for the past hour that calling delete deleted the pointer itself, not the memory pointed to by the pointer...but that would...
-
March 9th, 2010, 07:14 PM
Hi all,
When I try to delete some pointers the computer makes a noise like there's an error and then execution just halts. The program just sits there.
I suspect that this is a debug assertion...
-
January 11th, 2010, 11:05 AM
Oh I see you already stated that in a previous post. Sorry for that.
Thanks again.
-
January 11th, 2010, 10:02 AM
Alright that makes sense, thanks. The timing complexity stuff is interesting. I assume the + operator has a complexity of O(1)?
-
January 11th, 2010, 09:48 AM
Thanks for the quick and thorough replies everyone. I wasn't aware it was as simple as just saying "iter + 20".
Does that method work because iter is simply a pointer to the first element of the...
-
January 10th, 2010, 04:54 PM
Hi all,
I'd like to iterate through a vector but only iterate through a certain number of elements. I'm unsure of how to do this. E.g. I have a vector of size 30 yet I only want to iterate through...
-
January 7th, 2010, 02:27 PM
Thanks for the reply. I understand what you're saying, and I most certainly cannot argue about what's in the C++ standard, but I'm still hung up about this, from Richard.J's link...
-
January 7th, 2010, 12:24 PM
I guess I'm confused a bit now as to which strategy to use, as there seem to be a couple opposing views here. Although this is an interesting discussion, maybe I should better describe what I'm...
-
January 6th, 2010, 09:30 PM
Based on what I've read these were my thoughts too. I'm doing this because I have some program where I need to read in a string from cin, or something similar, in one thread, and access it from...
-
January 6th, 2010, 08:40 PM
Hi,
I've been trying this for awhile and I'm just about to give up and use volatile char* instead. I cannot even get this to work with a simple example. What am I missing?
Here's the most...
-
December 27th, 2009, 01:25 AM
Interesting discussion in the articles linked and the post above. Thanks for providing the links.
So is it safe to say the use of new should be minimized for multiple reasons, one major reason...
-
December 26th, 2009, 03:56 AM
Sorry, I figured out the problem; the pointer is indeed uninitialized so any attempts to get anything from it leads to a seg fault. So never mind.
-
December 26th, 2009, 03:42 AM
Hi all,
What are the disadvantages to declaring a C++ class pointer without the new operator? E.g. situation 1:
MyClass* myClass;
Situation 2:
-
October 12th, 2008, 02:40 PM
Wow I knew it was something silly. Thanks a lot for the help.
|
Click Here to Expand Forum to Full Width
|