Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Abstract Threading support #527

Open
capnkenny opened this issue Nov 2, 2022 · 0 comments
Open

Proposal: Abstract Threading support #527

capnkenny opened this issue Nov 2, 2022 · 0 comments
Labels
engine core Tickets pertaining to the engine core codebase. plugins This ticket is related to a first-party NovelRT plugin. proposal A proposal up for debate.

Comments

@capnkenny
Copy link
Member

What is the current behaviour?
At the moment, NovelRT contains a hard dependency on oneTBB, specifically for mutex support.

What is the expected behaviour/change?
I propose that we abstract any of the threading support required in NovelRT (thread, mutexes, etc).

What is the motivation / use case for changing the behavior?
At the moment, oneTBB can be a pretty big beast to compile for systems and has pretty specific rules during compilation.
As a result, it may not be desired if one wants to use backends such as SDL2, where there is threading support built in, or for mobile platforms where oneTBB may not necessarily be desired.
This is mainly for future scenarios (Web, Mobile, additional backends as they are added)

Describe alternatives you've considered:
Considered making a port of oneTBB for each addtl platform - very difficult, some incomplete versions exist already but again are incomplete.
Also considered moving only to stdlib - not completely desired as other implementations still have perf. benefits over stdlib implementations.

Are there any potential roadblocks or challenges facing this change?
This is dependent on how we utilize threading - if there's areas where we need specifics it may become difficult to abstract.
Will also require a C API - a challenge enough as it is :^)

Are there any downsides to implementing this change?
There may be some perf loss as oneTBB (previously) was considered the best balance of performance and accuracy. This should not be noticible to end users, however.

Additional context
N/A

@capnkenny capnkenny added proposal A proposal up for debate. engine core Tickets pertaining to the engine core codebase. plugins This ticket is related to a first-party NovelRT plugin. labels Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine core Tickets pertaining to the engine core codebase. plugins This ticket is related to a first-party NovelRT plugin. proposal A proposal up for debate.
Projects
None yet
Development

No branches or pull requests

1 participant