diff options
author | Michi Henning <michi@zeroc.com> | 2005-04-20 04:39:52 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2005-04-20 04:39:52 +0000 |
commit | f33dfeb2669c7a2b4b5b4d256ead1e3f00e43ef9 (patch) | |
tree | 195898d504ec54425a91ba753f1e226830a25443 /cs/src/Ice/ObjectAdapterFactory.cs | |
parent | Improved documentation for ObjectAdapterDeactivatedException. (diff) | |
download | ice-f33dfeb2669c7a2b4b5b4d256ead1e3f00e43ef9.tar.bz2 ice-f33dfeb2669c7a2b4b5b4d256ead1e3f00e43ef9.tar.xz ice-f33dfeb2669c7a2b4b5b4d256ead1e3f00e43ef9.zip |
Fixed a number of race conditions and made some destructor assertions safe.
Diffstat (limited to 'cs/src/Ice/ObjectAdapterFactory.cs')
-rwxr-xr-x | cs/src/Ice/ObjectAdapterFactory.cs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/cs/src/Ice/ObjectAdapterFactory.cs b/cs/src/Ice/ObjectAdapterFactory.cs index 748998e7158..4640cc8a7af 100755 --- a/cs/src/Ice/ObjectAdapterFactory.cs +++ b/cs/src/Ice/ObjectAdapterFactory.cs @@ -167,10 +167,15 @@ namespace IceInternal ~ObjectAdapterFactory() { - Debug.Assert(_instance == null); - Debug.Assert(_communicator == null); - Debug.Assert(_adapters.Count == 0); - Debug.Assert(!_waitForShutdown); +#if DEBUG + lock(this) + { + Debug.Assert(_instance == null); + Debug.Assert(_communicator == null); + Debug.Assert(_adapters != null); + Debug.Assert(!_waitForShutdown); + } +#endif DEBUG } private Instance _instance; |