diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/ConnectionFactory.cpp | 1 | ||||
-rw-r--r-- | cpp/src/IceUtil/Thread.cpp | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp index 58608b74b95..f6ccd511f03 100644 --- a/cpp/src/Ice/ConnectionFactory.cpp +++ b/cpp/src/Ice/ConnectionFactory.cpp @@ -285,6 +285,7 @@ IceInternal::OutgoingConnectionFactory::create(const vector<EndpointPtr>& endpts assert(transceiver); } connection = new ConnectionI(_instance, transceiver, endpoint, 0); + cout << "yyy " << IceUtil::ThreadControl().id() << endl; connection->validate(); if(_instance->defaultsAndOverrides()->overrideCompress) diff --git a/cpp/src/IceUtil/Thread.cpp b/cpp/src/IceUtil/Thread.cpp index bf2d54ab141..2e760ec3e1f 100644 --- a/cpp/src/IceUtil/Thread.cpp +++ b/cpp/src/IceUtil/Thread.cpp @@ -29,11 +29,11 @@ IceUtil::ThreadControl::ThreadControl() } } -IceUtil::ThreadControl::ThreadControl(const HandleWrapperPtr& handle, unsigned int id) +IceUtil::ThreadControl::ThreadControl(const HandleWrapperPtr& handle, ThreadId id) { IceUtil::Mutex::Lock lock(_stateMutex); _handle = handle; - _id = GetCurrentThreadId(); + _id = id; } IceUtil::ThreadControl::ThreadControl(const ThreadControl& tc) @@ -238,7 +238,9 @@ IceUtil::Thread::start(size_t stackSize) // __incRef(); - _handle->handle = (HANDLE)_beginthreadex(0, stackSize, (unsigned int (__stdcall*)(void*))startHook, (LPVOID)this, 0, &_id); + _handle->handle = (HANDLE)_beginthreadex( + 0, stackSize, (unsigned int (__stdcall*)(void*))startHook, (LPVOID)this, 0, &_id); + if(_handle->handle == 0) { __decRef(); @@ -317,7 +319,7 @@ IceUtil::Thread::operator<(const Thread& rhs) const #else -IceUtil::ThreadControl::ThreadControl(pthread_t id) +IceUtil::ThreadControl::ThreadControl(ThreadId id) { IceUtil::Mutex::Lock lock(_stateMutex); _id = id; |