Talk:Rendezvous: Difference between revisions

Rendezvous are possible in C++
(if it's a lang feature, C, C++, ... are out?)
(Rendezvous are possible in C++)
Line 15:
:This can be done, and should keep the task synchronized through the communication "port"; but of course there nothing like "arguments" passed or returned... there's a "message" flying from A to B and viceversa. <cite>it's a language feature, ...</cite> means it can't be implemented (as the task requires it) in e.g. C?
: Yes helped thanks, but I am always full of doubts... still without any idea about which languages I know can do that "as language feature"... currently I believe none of "mine". --[[User:ShinTakezou|ShinTakezou]] 15:50, 20 May 2009 (UTC)
::You certainly can implement it C++ using a corresponding [[OS]] library for threading and interlocking. (Clearly C++ is not a concurrent language, so any tasking should rely on [[OS]] services). It is possible to do, because I myself implemented rendezvous support for C++. Unfortunately I cannot contribute the code, because it is a part of a licensed library. The main obstacle for C++ is not synchronization, but a lack generic copy for classes. So it is impossible to re-raise an exact copy of an exception on another context. You start with a definition of an abstract C++ class, Task (or Thread if you prefer that name). Then you define methods Request_Rendezvous, Accept_Rendezvous etc. You will need a queue of rendezvous requests, usually doubly linked list. Limiting the waiting time for rendezvous to be serviced is a bit tricky, but nothing impossible.
::The discussion above about messages looks a bit strange, because rendezvous aren't messages. surely, it is possible to implement rendezvous on top of some messaging framework, but that would be rather stupid, because the main advantage of the rendezvous is its light weight compared to messages. The key features of a rendezvous is synchronism and absence of marshaling. --[[User:Dmitry-kazakov|Dmitry-kazakov]] 09:34, 21 May 2009 (UTC)