
I wonder if it is possible to use the signal library to do interprocess/(synchronized)interthread calls. Would it be easily possible to extend it into this aerea if not already possible? Am I considering the wrong library? If yes, could anyone please suggest a better approach? Thanks, Roland

Hi, I'm using signals for message dispatching along the threads in win32 app. But not directly. I have hidden message window, that is used to redirect messages from worker threads to the main thread. It contains internal signal object, which is triggered by a message. From outside it all looks like a signal, but the internal logic it altered as I have stated. HTH. Regards, Pavol On Mon, Oct 18, 2004 at 05:49:46PM +0200, Roland Schwarz wrote:
I wonder if it is possible to use the signal library to do interprocess/(synchronized)interthread calls. Would it be easily possible to extend it into this aerea if not already possible?
Am I considering the wrong library? If yes, could anyone please suggest a better approach?
Thanks, Roland
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Roland Schwarz wrote:
I wonder if it is possible to use the signal library to do interprocess/(synchronized)interthread calls. Would it be easily possible to extend it into this aerea if not already possible?
By "interprocess/(synchronized)interthread calls" do you mean signals that are triggered in one thread being handled by slots in another thread, or do you mean something else ?

Edward Diener wrote:
Roland Schwarz wrote:
I wonder if it is possible to use the signal library to do interprocess/(synchronized)interthread calls. Would it be easily possible to extend it into this aerea if not already possible?
By "interprocess/(synchronized)interthread calls" do you mean signals that are triggered in one thread being handled by slots in another thread, or do you mean something else ?
This is not exactly what I mean. I was thinking morealong the lines of a remote procedure call mechanism.

Roland Schwarz wrote:
This is not exactly what I mean. I was thinking morealong the lines of a remote procedure call mechanism.
As far as I know, this isn't possible, but its on my #2 on my signals wishlist after #1, thread safety. One way I could see this sort of thing implemented is similar to how a quality standard C++ library implements contrainers that can be shared between two processes: the signal class would be parameterized by an allocator, and only use storage that is a member of the class or that has been all allocated with this allocator. This would permit you to just pass it a shared memory allocator and allocate the Signal class itself in shared memory, and have everything "just work." Aaron W. LaFramboise

Roland Schwarz wrote:
Edward Diener wrote:
Roland Schwarz wrote:
I wonder if it is possible to use the signal library to do interprocess/(synchronized)interthread calls. Would it be easily possible to extend it into this aerea if not already possible?
By "interprocess/(synchronized)interthread calls" do you mean signals that are triggered in one thread being handled by slots in another thread, or do you mean something else ?
This is not exactly what I mean. I was thinking morealong the lines of a remote procedure call mechanism.
How does this fit in with boost::signals ? Do you mean to say that when the signal is triggered it could use RPC to call the slot functors if those functors were in another process ? That is certainly a worthy possibility to do interprocess communication using signal/slots but it is clearly not part of the current boost::signals implementation. I think such RPC functionality would need to be built into the boost::function/boost::bind implementations in order to work with boost::signals. Whether interprocess communication should be part of boost::function/boost::bind, and even how it would be done, is something Mr. Gregor and Mr. Dimov could decide if they so chose. Perhaps the first thing to be done is build an boost RPC libary. I have worked with RPC in the past, going from Windows to HP-UX, using the RPC functionality built into Windows but I would not swear that RPC is standardized across all major operating systems.

Edward Diener <eddielee@tropicsoft.com> wrote: Roland Schwarz wrote:
Edward Diener wrote:
Roland Schwarz wrote:
I wonder if it is possible to use the signal library to do interprocess/(synchronized)interthread calls. Would it be easily possible to extend it into this aerea if not already possible?
By "interprocess/(synchronized)interthread calls" do you mean signals that are triggered in one thread being handled by slots in another thread, or do you mean something else ?
This is not exactly what I mean. I was thinking morealong the lines of a remote procedure call mechanism.
How does this fit in with boost::signals ? Do you mean to say that when the signal is triggered it could use RPC to call the slot functors if those functors were in another process ? That is certainly a worthy possibility to do interprocess communication using signal/slots but it is clearly not part of the current boost::signals implementation. I think such RPC functionality would need to be built into the boost::function/boost::bind implementations in order to work with boost::signals. Whether interprocess communication should be part of boost::function/boost::bind, and even how it would be done, is something Mr. Gregor and Mr. Dimov could decide if they so chose. Perhaps the first thing to be done is build an boost RPC libary. I have worked with RPC in the past, going from Windows to HP-UX, using the RPC functionality built into Windows but I would not swear that RPC is standardized across all major operating systems.
RPC is standardised across platforms. Eg. DCE RPC and CORBA. However, the interesting thing from a C++ would be the enabling of a function / method call to masquerade as a direct call or as another type of message, such as: RPC (local or network), indirectly threaded call to a pool of worker threads or any other some other message target. This would be a key feature to enabling true model driven architectural approaches. Change the policy usage in your hpp and you have a different architecture for your app. Libraries such as function, named_params (near library), serialization, (for marshalling where required), thread would provide the leverage to get this done. The key missing link to make it widely useful is a network library component that boost does not yet have. As Edward wrote, I would imagine boost::signals using such a mechanism to implement some intriguing possibilities rather than boost signals being the mechanism to deliver that functionality. $0.02 matt.

On Mon, 18 Oct 2004 17:49:46 +0200, Roland Schwarz <roland.schwarz@chello.at> wrote:
I wonder if it is possible to use the signal library to do interprocess/(synchronized)interthread calls. Would it be easily possible to extend it into this aerea if not already possible?
This from an earlier thread on the topic: Date: Thu, 23 Sep 2004 15:47:29 -0500 Subject: Re: [boost] Thread-safety in Boost.Signals From: Doug Gregor On Sep 23, 2004, at 3:13 AM, Aaron W. LaFramboise wrote:
I see that the FAQ mentions that a future version of Boost.Signals will be thread-safe. Are there any plans for this to happen any time soon?
I think we know how to do it, mostly, but there are no concrete plans to do it.
Right now, is there even a weak thread-safety guarantee? Specifically, may two separate signal objects be manipulated by two separate threads at the same time?
There really aren't any guarantees, even weak ones :( Doug -- Caleb Epstein caleb.epstein@gmail.com
participants (6)
-
Aaron W. LaFramboise
-
Caleb Epstein
-
Edward Diener
-
Matt Hurd
-
Pavol Droba
-
Roland Schwarz