
This patch attaches a HTML::EventLoop to the main thread JS::VM used for JavaScript bindings in the web engine. The goal here is to model the various task scheduling mechanisms of the HTML specification.
24 lines
324 B
C++
24 lines
324 B
C++
/*
|
|
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibWeb/HTML/EventLoop/TaskQueue.h>
|
|
|
|
namespace Web::HTML {
|
|
|
|
TaskQueue::TaskQueue()
|
|
{
|
|
}
|
|
|
|
TaskQueue::~TaskQueue()
|
|
{
|
|
}
|
|
|
|
void TaskQueue::add(NonnullOwnPtr<Task> task)
|
|
{
|
|
m_tasks.enqueue(move(task));
|
|
}
|
|
|
|
}
|