cool-threads branch: waking the main loop from the subscript queue
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- cpp
- Domaine
- backend-api-design, performance
Piste de recherche
The issue points to ui_subscript.cpp lines 227, 247, 282, 354, 364, and 452, and engine/system/win/sys_main.cpp lines 697–704. Read the feat/cool-threads branch at commit f36c1d0 alongside the referenced main loop to understand how its worker queue and event handling fit together. The reported work spans waking the loop, the unused finished flag, and Lua state access across threads; clarify scope with the maintainer before estimating completion.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
About the WIP branch feat/cool-threads on your fork (at f36c1d0), since issues are turned off there. A few spots I noticed while reading.
The new queue is a good place to wake the main loop. A glfwPostEmptyEvent() after each push (https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/f36c1d0a0848bc609b9cad0880a65c03b305a1c7/ui_subscript.cpp#L227, https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/f36c1d0a0848bc609b9cad0880a65c03b305a1c7/ui_subscript.cpp#L247, https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/f36c1d0a0848bc609b9cad0880a65c03b305a1c7/ui_subscript.cpp#L354) would let the main loop wait in glfwWaitEventsTimeout instead of glfwPollEvents (https://github.com/PathOfBuildingCommunity/PathOfBuilding-SimpleGraphic/blob/421d18871cccb2696b5a57e6d72a9fc22fa641ae/engine/system/win/sys_main.cpp#L697-L704). Right now the main thread still picks the messages up by polling once per frame (https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/f36c1d0a0848bc609b9cad0880a65c03b305a1c7/ui_subscript.cpp#L364).
finished is set at https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/f36c1d0a0848bc609b9cad0880a65c03b305a1c7/ui_subscript.cpp#L282 but nothing reads it anymore.
GetScriptMemory calls lua_gc on the worker's state from the main thread while the worker runs (https://github.com/zao/PathOfBuilding-SimpleGraphic/blob/f36c1d0a0848bc609b9cad0880a65c03b305a1c7/ui_subscript.cpp#L452). Same as on master.
- Langage dominant
- C++
- Étoiles
- 23
- Forks
- 69
- Merge moyen
- 2 h 50 min
- PR mergées (30 j)
- 1
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de PathOfBuildingCommunity/PathOfBuilding-SimpleGraphic
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 38/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 42/100
-
Difficulté 4/5 1-2 jours Accessibilité débutants 48/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 72/100
Toutes les issues de PathOfBuildingCommunity/PathOfBuilding-SimpleGraphic
Issues similaires
-
enhancement help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
difficulty:easy prio:normal type:bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
NatronGitHub/openfx-supportext#326 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
zucch1/android-auto-jetson#293 ·
Les mainteneurs répondent en général sous 1 jour
-
lfortran -E exits with status 0 after a C preprocessor error (#error, wrong macro argument count)Ouvertebug low priority preprocessor
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
Les mainteneurs répondent en général sous 1 jour
-
difficulty:easy enhancement prio:low
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
NatronGitHub/openfx-misc#502 ·
Les mainteneurs répondent en général sous 1 jour