mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-27 01:03:08 +00:00
回退 'Pull Request !46827 : [Bug]: eventHandler析构前销毁所有的任务'
This commit is contained in:
parent
5566db51d1
commit
7475006938
@ -28,7 +28,7 @@ class TaskRunnerAdapter : public virtual AceType {
|
||||
|
||||
public:
|
||||
TaskRunnerAdapter() = default;
|
||||
~TaskRunnerAdapter() override = default;
|
||||
virtual ~TaskRunnerAdapter() override = default;
|
||||
|
||||
virtual void PostTask(
|
||||
std::function<void()> task, const std::string& name, PriorityType priorityType = PriorityType::LOW)
|
||||
|
@ -16,13 +16,6 @@
|
||||
#include "core/common/task_runner_adapter_impl.h"
|
||||
|
||||
namespace OHOS::Ace {
|
||||
TaskRunnerAdapterImpl::~TaskRunnerAdapterImpl()
|
||||
{
|
||||
if (eventHandler_) {
|
||||
eventHandler_->RemoveAllEvents();
|
||||
}
|
||||
}
|
||||
|
||||
void TaskRunnerAdapterImpl::Initialize(bool useCurrentEventRunner, const std::string& name)
|
||||
{
|
||||
if (useCurrentEventRunner) {
|
||||
|
@ -27,7 +27,7 @@ class TaskRunnerAdapterImpl final : public TaskRunnerAdapter {
|
||||
|
||||
public:
|
||||
TaskRunnerAdapterImpl():TaskRunnerAdapter() {};
|
||||
~TaskRunnerAdapterImpl() override;
|
||||
~TaskRunnerAdapterImpl() = default;
|
||||
void PostTask(std::function<void()> task, const std::string& name, PriorityType priorityType = PriorityType::LOW) override;
|
||||
void PostTaskForTime(std::function<void()> task, uint32_t targetTime, const std::string& caller) override;
|
||||
void PostDelayedTask(
|
||||
|
Loading…
Reference in New Issue
Block a user