One major recurring problem with all these Async talks at #CppCon is that they assume the program starts with main(), or you will eventually wait. For simple “script-like” applications that’s fine. For anything larger, it’s insufficient.
-
Näytä tämä ketju
-
If we want a paradigm of parallelism we have to stop thinking that your program’s entry point is main. A parallel applications’s entry point is the first task. That task spawns more tasks. When there are no active tasks, the program is ready to exit.
1 vastaus 0 uudelleentwiittausta 5 tykkäystäNäytä tämä ketju -
Main() should initialize your tasks queue and launch Task0. You real application starts there. Wait of any kind should be forbidden. If you truly can’t continue execution until some condition is met, you reschedule the current task.
1 vastaus 0 uudelleentwiittausta 4 tykkäystäNäytä tämä ketju -
Your application “loop” is done by the tail task scheduling the head task again. This sort of looping is rarely addressed. Yeah we get parallel loops. Those aren’t the challenging part. Those are “embarrassingly” easy.
1 vastaus 0 uudelleentwiittausta 5 tykkäystäNäytä tämä ketju -
We need to talk about the entire application being a parallel/concurrent application, starting from your entry point.
3 vastausta 0 uudelleentwiittausta 5 tykkäystäNäytä tämä ketju -
Vastauksena käyttäjälle @tloch14
I have implemented this in a toy OS. It works, but your application is more complicated for it. Soon will retry with c++20 coroutines. https://github.com/dascandy/rodvin_async/blob/master/kernel/src/common/Shell.cpp … - the shell as async program
1 vastaus 0 uudelleentwiittausta 2 tykkäystä -
Vastauksena käyttäjille @dascandy42 ja @tloch14
If you're at the meet the speakers dinner tonight I'd love to chat about this kind of thing
1 vastaus 0 uudelleentwiittausta 0 tykkäystä
Unfortunately not. Only had the basic pass.
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.