Menu

#214 Safe references in OpalCall class

Enhancement
closed-rejected
OPAL (138)
5
2007-09-13
2007-03-23
No

In OpalCall class, references to OpalConnection instances are referenced using PSafePtr objects. As the obtained reference is used only for invoking methods, a read-only or read-write lock is unnecessary. Whether the connection instance needs to lock itself while executing the given method is not something the caller should worry about.

This patch uses PSafeReference in all such cases. The patch in tracker item 1686620 is associated with this patch.

Discussion

  • Borko Jandras

    Borko Jandras - 2007-03-23

    patch for call.cxx

     
  • Borko Jandras

    Borko Jandras - 2007-03-23
    • assigned_to: nobody --> csoutheren
     
  • Robert Jongbloed

    Logged In: YES
    user_id=774817
    Originator: NO

    Actually I would like to leave most of these the way they are. While in principle the called should probably be responsible for the lock type, in practice it is much safer to have the caller do the locking. For example, user code overrides a virtual that is called in one of these places and that user forgets to do the lock then WE get told of crashes that are not our fault. It's "better" to make it more difficult for people to stuff up.

     
  • Robert Jongbloed

    • milestone: 301390 --> Enhancement
    • assigned_to: csoutheren --> rjongbloed
    • status: open --> closed-rejected
     

Log in to post a comment.

MongoDB Logo MongoDB