mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 02:18:04 +01:00
merge some changes from develop branch; modernize and clean-up code; remove support for compiling without POCO_WIN32_UTF8
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user