|
From: Frank V. C. <fr...@co...> - 2000-08-30 10:55:00
|
Hans - Dulimarta wrote: > > On Tue, 29 Aug 2000, Frank V. Castellucci wrote: > > > Date: Tue, 29 Aug 2000 06:44:41 -0400 > > From: Frank V. Castellucci <fr...@co...> > > Reply-To: cor...@li... > > To: cor...@li... > > Subject: Re: [Corelinux-develop] Recursion in EventSemaphore > > > > Hans - Dulimarta wrote: > > > > > > For the next release (0.4.27), I will implement EventSemaphore with > > > "infinite" number of listeners. Any process/thread that wants to wait > > > for an event (lock itself to the event) will be allowed to do so. > > > > Thats fine, but the requirement does call for limiting the number of > > listeners (see Balking), which would turn away threads when the limit is > > reached. > > > > The signature of the EventSemaphore constructor does not have any formal > parameter which can be used to specify the maximum limit of listeners. > I could not find this either in the .mdf files. > > Again, I am assuming that the design of EventSemaphore class interface > is final and I am not supposed to change it. No, it was an oversight on my part as I knew it was not low fruit on the tree. It SHOULD have it as per the requirement. > > > > So, from what I could understand by reading the code and the "manual", > > > for this "infinite" listener version of EvSem the recursion mode is > > > irrelevant. Am I making a correct assumption? > > > > It feels like it would be irrelevant to register a single thread more > > than once. I assume that you are tracking which threads are listening on > > a EventSemaphore and can detect this? If so, the question remains, is it > > an error or intentional usage by the user? > > How is it possible for a single thread to register more than once. > Once a thread register (wait for event) it will be blocked until the > event takes place, or if it enables balking mode it will not be registered > and hence it won't be blocked. > > No, I don't keep any track of who are listening to the event. I prefer to > make the data member of EventSemaphore as minimal as possible. Ok > > > > > -- > > > Hans Dulimarta, Ph.D. dul...@co... > > > P: 517-432-7589 http://www.egr.msu.edu/~dulimart > > > F: 760-281-7691 http://corelinux.sourceforge.net > > > Elec. & Comp. Engg., Mich. State Univ., E. Lansing, MI 48824 > > > > > > _______________________________________________ > > > Corelinux-develop mailing list > > > Cor...@li... > > > http://lists.sourceforge.net/mailman/listinfo/corelinux-develop > > > > > > -- > Hans Dulimarta, Ph.D. dul...@co... > P: 517-432-7589 http://www.egr.msu.edu/~dulimart > F: 760-281-7691 http://corelinux.sourceforge.net > Elec. & Comp. Engg., Mich. State Univ., E. Lansing, MI 48824 > > _______________________________________________ > Corelinux-develop mailing list > Cor...@li... > http://lists.sourceforge.net/mailman/listinfo/corelinux-develop -- Frank V. Castellucci http://corelinux.sourceforge.net OOA/OOD/C++ Standards and Guidelines for Linux http://PythPat.sourceforge.net Pythons Pattern Package |