cool-threads branch: waking the main loop from the subscript queue
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 25/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- cpp
- Domínio
- backend-api-design, performance
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- C++
- Estrelas
- 23
- Forks
- 69
- Merge médio
- 2h 50min
- PRs com merge (30d)
- 1
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de PathOfBuildingCommunity/PathOfBuilding-SimpleGraphic
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 38/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 42/100
-
Dificuldade 4/5 1-2 dias Facilidade para iniciantes 48/100
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 72/100
Todas as issues de PathOfBuildingCommunity/PathOfBuilding-SimpleGraphic
Issues semelhantes
-
enhancement help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
-
difficulty:easy prio:normal type:bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
NatronGitHub/openfx-supportext#326 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
zucch1/android-auto-jetson#293 ·
Mantenedores costumam responder em até 1 dia
-
lfortran -E exits with status 0 after a C preprocessor error (#error, wrong macro argument count)Abertabug low priority preprocessor
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
Mantenedores costumam responder em até 1 dia
-
difficulty:easy enhancement prio:low
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
NatronGitHub/openfx-misc#502 ·
Mantenedores costumam responder em até 1 dia