diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-09-07 15:34:06 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-09-07 15:34:06 -0400 |
commit | 1e2e7ed93ce4fbe4f1f1ef5c100b38a2edb31527 (patch) | |
tree | bb69ccda51b972d01ad1c3381b8d307cdeca5232 /cpp/src/Freeze/TransactionI.h | |
parent | updating reserved words & keyword test (diff) | |
download | ice-1e2e7ed93ce4fbe4f1f1ef5c100b38a2edb31527.tar.bz2 ice-1e2e7ed93ce4fbe4f1f1ef5c100b38a2edb31527.tar.xz ice-1e2e7ed93ce4fbe4f1f1ef5c100b38a2edb31527.zip |
Refcounting is now thread-safe
Diffstat (limited to 'cpp/src/Freeze/TransactionI.h')
-rw-r--r-- | cpp/src/Freeze/TransactionI.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cpp/src/Freeze/TransactionI.h b/cpp/src/Freeze/TransactionI.h index cb5da8a4e61..0172e5126c5 100644 --- a/cpp/src/Freeze/TransactionI.h +++ b/cpp/src/Freeze/TransactionI.h @@ -20,6 +20,9 @@ namespace Freeze class ConnectionI; typedef IceUtil::Handle<ConnectionI> ConnectionIPtr; +class SharedMutex; +typedef IceUtil::Handle<SharedMutex> SharedMutexPtr; + class PostCompletionCallback : public virtual IceUtil::Shared { public: @@ -42,7 +45,9 @@ public: // // Custom refcounting implementation // + virtual void __incRef(); virtual void __decRef(); + virtual int __getRef() const; void rollbackInternal(bool); void setPostCompletionCallback(const PostCompletionCallbackPtr&); @@ -60,6 +65,8 @@ private: friend class ConnectionI; + int __getRefNoSync() const; + void postCompletion(bool, bool); const Ice::CommunicatorPtr _communicator; @@ -68,6 +75,8 @@ private: const Ice::Int _warnRollback; DbTxn* _txn; PostCompletionCallbackPtr _postCompletionCallback; + SharedMutexPtr _refCountMutex; + int _refCount; }; typedef IceUtil::Handle<TransactionI> TransactionIPtr; |