What is the use of RProcess ::Rendezvous()

Login to reply to this topic.
Wed, 2006-04-19 16:06
Joined: 2003-07-22
Forum posts: 70
Hi
I am not able to understand from SDK about  RProcess ::Rendezvous()

Can anybody tell me what is the purpose of this API or some Link

-MeenuJ

Wed, 2006-04-19 18:37
Joined: 2004-11-29
Forum posts: 1232
Re: What is the use of RProcess ::Rendezvous()
One very useful use for it is when you start up a thread, but want to wait in the first thread, until the starting thread has finished initialization.

Or any time when two threads need some synchronization.

I think that is the main usecase its designed for, but you can ofcourse use it anyway you feel useful.

There is two versions of the Rendevouz call that does very different things. The one that takes a TRequestStatus, you are supposed to call in the first thread, and then wait on the TRequestStatus with User::WaitForRequest. (or embed in a CActive)

In the second, new thread, you call the Rendevouz call that takes a TInt when you want the first thread to stop waiting.
That call will complete the request with the TInt as errorcode, and make the first thread start to execute again.

  • Login to reply to this topic.