GameDevTecnico / cubos

A still very barebones game engine focused on voxels and data-oriented programming
https://cubosengine.org
MIT License
83 stars 36 forks source link

Add threading Tasks #1111

Closed RiscadoA closed 6 months ago

RiscadoA commented 6 months ago

Description

Utility class which can be used to wait for results which come from asynchronous code. This will be really useful to implement stuff like waiting for a given voxel object to be loaded and meshed, instead of just blocking the entire application. With this we'll able to implement stuff like smooth terrain loading and loading screens.

Since this doesn't really fit in the other existing modules, created a new dir core/thread and also moved the thread pool class there.

Checklist

github-actions[bot] commented 6 months ago

PR Preview Action v1.4.7 :---: :rocket: Deployed preview to https://GameDevTecnico.github.io/cubos/docs-preview/pr-1111/ on branch gh-pages at 2024-04-08 14:49 UTC

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 38.35%. Comparing base (39b0dff) to head (392ad03).

:exclamation: Current head 392ad03 differs from pull request most recent head 41bad96. Consider uploading reports for the commit 41bad96 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1111 +/- ## ========================================== + Coverage 38.15% 38.35% +0.19% ========================================== Files 321 321 Lines 25644 25686 +42 ========================================== + Hits 9784 9851 +67 + Misses 15860 15835 -25 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.