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

@@ -23,6 +23,7 @@
#include "Poco/Thread.h"
#include "Poco/Mutex.h"
#include "Poco/Runnable.h"
#include "Poco/AutoPtr.h"
#include "Poco/NotificationQueue.h"
@@ -40,15 +41,17 @@ class Foundation_API AsyncChannel: public Channel, public Runnable
/// then processed by a separate thread.
{
public:
AsyncChannel(Channel* pChannel = 0, Thread::Priority prio = Thread::PRIO_NORMAL);
using Ptr = AutoPtr<AsyncChannel>;
AsyncChannel(Channel::Ptr pChannel = 0, Thread::Priority prio = Thread::PRIO_NORMAL);
/// Creates the AsyncChannel and connects it to
/// the given channel.
void setChannel(Channel* pChannel);
void setChannel(Channel::Ptr pChannel);
/// Connects the AsyncChannel to the given target channel.
/// All messages will be forwarded to this channel.
Channel* getChannel() const;
Channel::Ptr getChannel() const;
/// Returns the target channel.
void open();
@@ -86,7 +89,7 @@ protected:
void setPriority(const std::string& value);
private:
Channel* _pChannel;
Channel::Ptr _pChannel;
Thread _thread;
FastMutex _threadMutex;
FastMutex _channelMutex;