ThreadPool now working with no memory leaks

This commit is contained in:
Dynamitos
2022-02-14 16:29:26 +01:00
parent 6d48267ec2
commit 5268bb68e2
15 changed files with 287 additions and 97 deletions
+9 -6
View File
@@ -40,12 +40,15 @@ Seele::SceneView::SceneView(Gfx::PGraphics graphics, PWindow owner, const Viewpo
plane->setWorldScale(Vector(100, 100, 100));
scene->addPrimitiveComponent(plane);
PMyComponent myComp = new MyComponent();
PMyOtherComponent myOtherComp = new MyOtherComponent();
PActor actor = new Actor();
actor->setRootComponent(myComp);
myComp->addChildComponent(myOtherComp);
scene->addActor(actor);
for(uint32 i = 0; i < 1; ++i)
{
PMyComponent myComp = new MyComponent();
PMyOtherComponent myOtherComp = new MyOtherComponent();
PActor actor = new Actor();
actor->setRootComponent(myComp);
myComp->addChildComponent(myOtherComp);
scene->addActor(actor);
}
scene->start();
PRenderGraphResources resources = new RenderGraphResources();
+2 -2
View File
@@ -75,8 +75,8 @@ void Window::setFocused(PView view)
Job Window::viewWorker(size_t viewIndex)
{
WindowView* windowView = views[viewIndex];
windowView->view->beginUpdate();
windowView->view->update();
co_await windowView->view->beginUpdate();
co_await windowView->view->update();
{
std::scoped_lock lock(windowView->workerMutex);
windowView->view->commitUpdate();