-
Notifications
You must be signed in to change notification settings - Fork 391
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5716 from npoltorapavlo/DELIA-66118-main
Delia 66118 main
- Loading branch information
Showing
16 changed files
with
373 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#pragma once | ||
|
||
#include "../../Module.h" | ||
|
||
class WorkerPoolImplementation | ||
: public WPEFramework::Core::WorkerPool, | ||
public WPEFramework::Core::ThreadPool::ICallback { | ||
private: | ||
class Dispatcher : public WPEFramework::Core::ThreadPool::IDispatcher { | ||
public: | ||
Dispatcher(const Dispatcher&) = delete; | ||
Dispatcher& operator=(const Dispatcher&) = delete; | ||
Dispatcher() = default; | ||
~Dispatcher() override = default; | ||
|
||
private: | ||
void Initialize() override | ||
{ | ||
} | ||
void Deinitialize() override | ||
{ | ||
} | ||
void Dispatch(WPEFramework::Core::IDispatch* job) override | ||
{ | ||
job->Dispatch(); | ||
} | ||
}; | ||
|
||
public: | ||
WorkerPoolImplementation() = delete; | ||
WorkerPoolImplementation(const WorkerPoolImplementation&) = delete; | ||
WorkerPoolImplementation& operator=(const WorkerPoolImplementation&) = delete; | ||
WorkerPoolImplementation(const uint32_t stackSize) | ||
: WPEFramework::Core::WorkerPool(4 /*threadCount*/, stackSize, 32 /*queueSize*/, &_dispatch, this) | ||
, _dispatch() | ||
{ | ||
Run(); | ||
} | ||
~WorkerPoolImplementation() override | ||
{ | ||
Stop(); | ||
} | ||
void Idle() override | ||
{ | ||
} | ||
|
||
private: | ||
Dispatcher _dispatch; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.