Reland of Change ProcessThread's task type to be the one from TaskQueue. (patchset #1 id:1 of https://codereview.webrtc.org/2020783003/ )
Reason for revert: Reland. It was a false alarm. Original issue's description: > Revert of Change ProcessThread's task type to be the one from TaskQueue. (patchset #3 id:80001 of https://codereview.webrtc.org/2016043003/ ) > > Reason for revert: > Downstream issues > > Original issue's description: > > Change ProcessThread's task type to be the one from TaskQueue. > > ProcessThread will eventually be replaced by TaskQueue, so this is the first little step. > > > > BUG= > > R=magjed@webrtc.org > > > > Committed: https://crrev.com/400a276c8a0b299190ff17a81edd8780a26d63d3 > > Cr-Commit-Position: refs/heads/master@{#12952} > > TBR=magjed@webrtc.org > # Not skipping CQ checks because original CL landed more than 1 days ago. > BUG= > > Committed: https://crrev.com/641455176a1241dea6dda7071ba4162f41a0b5fc > Cr-Commit-Position: refs/heads/master@{#12953} TBR=magjed@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Review-Url: https://codereview.webrtc.org/2017333002 Cr-Commit-Position: refs/heads/master@{#12954}
This commit is contained in:
@ -15,17 +15,23 @@
|
||||
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
#if defined(WEBRTC_WIN)
|
||||
// Due to a bug in the std::unique_ptr implementation that ships with MSVS,
|
||||
// we need the full definition of QueuedTask, on Windows.
|
||||
#include "webrtc/base/task_queue.h"
|
||||
#else
|
||||
namespace rtc {
|
||||
class QueuedTask;
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace webrtc {
|
||||
class Module;
|
||||
|
||||
class ProcessTask {
|
||||
public:
|
||||
ProcessTask() {}
|
||||
virtual ~ProcessTask() {}
|
||||
|
||||
virtual void Run() = 0;
|
||||
};
|
||||
|
||||
// TODO(tommi): ProcessThread probably doesn't need to be a virtual
|
||||
// interface. There exists one override besides ProcessThreadImpl,
|
||||
// MockProcessThread, but when looking at how it is used, it seems
|
||||
// a nullptr might suffice (or simply an actual ProcessThread instance).
|
||||
class ProcessThread {
|
||||
public:
|
||||
virtual ~ProcessThread();
|
||||
@ -51,7 +57,7 @@ class ProcessThread {
|
||||
// construction thread of the ProcessThread instance, if the task did not
|
||||
// get a chance to run (e.g. posting the task while shutting down or when
|
||||
// the thread never runs).
|
||||
virtual void PostTask(std::unique_ptr<ProcessTask> task) = 0;
|
||||
virtual void PostTask(std::unique_ptr<rtc::QueuedTask> task) = 0;
|
||||
|
||||
// Adds a module that will start to receive callbacks on the worker thread.
|
||||
// Can be called from any thread.
|
||||
|
||||
Reference in New Issue
Block a user