[omniORB] static variable & thread

cedric charrier cedric.charrier@detexis.thomson-csf.com
Mon, 06 Mar 2000 16:10:24 +0100


Renny,

Thanks for your answers, it helps me very much, but I have some others questions
on this subject.
    - I want to develop an application with a client calling a server which
execute threads.
So I tried to write like you say a _i class which inherit from the both _sk
class and omnithread class. It seem ok, but when the constructor tries to
execute the run() method of omnithread (calling by start()), the program abort.
Perhaps I have to declare in the IDL file this inheritance with omnithread ? How
can I do that ?

    - I have done an example in which I define in the _sk class, a static member
like you explain to me. It's OK but I need to declare this static member in the
IDL interface because I want client object can read this static variable. Is
there an equivalent of a static member in the IDL syntax or need I write a
method for reading the static members ?

Thanks for all, sincerely

Cedric Charrier
-----------------------------------------------------------------------------------

Renny Koshy wrotes :

> Cedric:
>
> I've done exactly what you've typed as an example.  i.e. I have classes that
> inherit from the _sk_ classes, which have static members (both attributes
> and methods).
>
> In terms of omnithread, I've just done it by multiple inheritance.
>
> class try_i : public virtual _sk_try, public virtual omnithread
> {
> }