[omniORB] Questions about threading issues?

Mark Johnson mark.johnson@onfiber.com
Thu, 6 Sep 2001 09:31:49 -0500


Let's say I have the following, do I have to manage access to 'controller'
through mutexs or will CORBA do this for me?  There is no actual shared
memory inside Foo() and Bar() the only shared memory is between Thread1()
and Thead2() (the 'controller')

Controller_var Controller = ... // a successfully narrowed distributed
object

void main()
{
	CREATE_THREAD( Thread1, ... );
	CREATE_THREAD( Thread2, ... )
}

void Thread1( void * arg )
{
	while( true )
	{
		Controller->Foo();
	}
}
void Thread2( void * arg )
{
	while( true )
	{
		Controller->Bar();
	}
}