[omniORB] omnithread creation
Ben Miller
Ben.Miller@Mercia.Com
Wed, 9 May 2001 17:16:00 +0100
This is C++ related and as such is nothing to do with omniORB or
CORBA. Briefly, the reason it will not compile with a non-static
member function of a class is that this function will expect the
'this' pointer to be passed in as the first parameter to it. There
is no way that omni_thread::create knows that its first parameter
belongs to a specific instance of your class. Using a static class
member function is okay because it does not expect the 'this' pointer.
Take a look at some C++ help on static member functions...
-----Original Message-----
From: kexin li [mailto:kexin_li2001@yahoo.com]
Sent: 9 May 2001 16:57
To: omniorb-list@uk.research.att.com
Subject: [omniORB] omnithread creation
I try to create thread with function like
omni_thread::create(a_private_method_name_of_a_class,
make_arg(i));
This can only pass compilation when I declare
a_private_method_name_of_a_class to be a static method
of class. Do you know why?
kexin
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
Mercia Software Ltd.
Mercia House
Ashted Lock
Aston Science Park
Birmingham B7 4AZ, UK
Registered Number: 1868855 (Cardiff)
Tel: 44 (0)121 359 5096
Fax: 44 (0)121 359 0375
Web Site: http://www.mercia.com