merge some changes from develop branch; modernize and clean-up code; remove support for compiling without POCO_WIN32_UTF8

This commit is contained in:
Günter Obiltschnig
2020-01-09 10:08:09 +01:00
parent 7c177b6f89
commit 1bf40a0cd2
389 changed files with 3029 additions and 4111 deletions

View File

@@ -46,11 +46,10 @@ private:
};
AsyncChannel::AsyncChannel(Channel* pChannel, Thread::Priority prio):
AsyncChannel::AsyncChannel(Channel::Ptr pChannel, Thread::Priority prio):
_pChannel(pChannel),
_thread("AsyncChannel")
{
if (_pChannel) _pChannel->duplicate();
_thread.setPriority(prio);
}
@@ -60,7 +59,6 @@ AsyncChannel::~AsyncChannel()
try
{
close();
if (_pChannel) _pChannel->release();
}
catch (...)
{
@@ -69,17 +67,15 @@ AsyncChannel::~AsyncChannel()
}
void AsyncChannel::setChannel(Channel* pChannel)
void AsyncChannel::setChannel(Channel::Ptr pChannel)
{
FastMutex::ScopedLock lock(_channelMutex);
if (_pChannel) _pChannel->release();
_pChannel = pChannel;
if (_pChannel) _pChannel->duplicate();
}
Channel* AsyncChannel::getChannel() const
Channel::Ptr AsyncChannel::getChannel() const
{
return _pChannel;
}
@@ -89,8 +85,7 @@ void AsyncChannel::open()
{
FastMutex::ScopedLock lock(_threadMutex);
if (!_thread.isRunning())
_thread.start(*this);
if (!_thread.isRunning()) _thread.start(*this);
}