We have narrowed it down to the message receiver thread. It seems to hang there long enough to continue existing when the other process requests to reattach.
That`s why, if we kill the thread first from the shell, it works.
After doing some more tests, we managed to find out that if the...
Hi,
Why make it simple when it can be complicated! :o)
I am a bit ashamed that I did'nt think about this before. It's simple and efficient.
After looking at it and making some tests we have managed to make it work. One thing that I had not mentionned is that the variable struct will be...
Hi,
Ok, here's the context. The main purpose is to optimize our processing in an observer pattern. We wanted to have a mechanism to avoid doing costly searches in a map of observers. As you know, searching in a map costs O(n). Upon modification of a variable we need to look in the map to...
Hi to all.
I'm trying to use typelists of the Loki Library. It works fine but I need an additional feature and I don't know if it is feasable.
You can access typelist's elements with an index like the following.
Field<0>(myTypelist);
Unfortunately the index has to be known at...
chipperMDW:
The kernel is 2.4.18-3. It is a commercial Real-Time Linux kernel developped by Timesys. I'll check with them to find out if there is a bug in memory cleaning. One would hope that it doesn't take time to free the memory after a program completion. That's what we thought also...
Thanks for your reply chipperMDW. :o)
I tried to wait 30 secs before restarting my Subject. It does make it work. In fact, 1 sec is enough. Unfortunately I need to do all this processing under 10ms! So I think linux doesn't have time to clean the memory before I restart it. That would...
To add additional info.
As told before my Subject class starts a message receiving thread.
Main Thread
I do updates here it calls the inform function. Here the size of my map and lists are zero. Perfect!
Receiver Thread
I receive the attach command, call attach of my Subject. Here the...
Hi all!
I am developping an Observer Pattern that works between processes. In my library I am using a stl::map of observers. In fact, the map if index by a key and returns a STL list of observersIDs.
so it looks like:
map< const int, list < controlId > > ObserversMap;
In my Subject Class I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.