Re: change request: linc API



On 18Nov2001 06:10PM (-0500), Michael Meeks wrote:
> 
> Hi Guys,
> 
> 	I'd like to add some methods to linc; simply because we can't
> hope to have a thread safe ORB without them:
> 
> extern GMutex *linc_lifecycle_lock;
> 
> void    linc_object_ref   (GObject *object);
> void    linc_object_unref (GObject *object);
> 
> 	Of course - as with any linc API change - the only real user
> that's affected is ORBit2; so it will have an extremely minimal
> impact.
> 

Since it's all additions and is needed for future thread-safety, I
think this change is fine.

(I suggested to Michael on IRC that instead of exposing the lock
variable it may be better to have an accessor function. The reasons
for this are that variable relocs lead to potentially less efficient
dynamic linking than function relocs, and that a variable provided by
a libary can't be accessed safely unless you are sure the init
function has been called. If Michael wants to redo it as an accessor
function instead of exposing the variable, I think that would be even
better. But the change is approved either way.)

Regards,

Maciej




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]