-
Notifications
You must be signed in to change notification settings - Fork 7
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
Feature/process module #51
base: main
Are you sure you want to change the base?
Conversation
2e519ed adds support for asynchronous process execution, streaming stdout and stderr back into a // Before main loop...
auto git_output = std::vector<std::string>();
auto p = Arcade::Process("git", std::vector<std::string> {"clone", url});
p.execute_async(buffer);
// Main loop
while (! quit_requested()) {
process_events();
// Draw loading screen...
// Draw the most recent chunk of text receievd from git
draw_text(git_output.back(), /* etc */);
refresh_screen();
} |
…h/arcade-machine into feature/process-module
Interesing.. I don't have an env to test this on, but keen to see this in action |
…h/arcade-machine into feature/process-module
// Before main loop...
auto p = new ArcadeProcess("git", std::vector<std::string> {"clone", url});
p->execute_async();
// Main loop
while (! quit_requested()) {
process_events();
// Draw loading screen...
// Draw the most recent chunk of text receievd from git
draw_text(p->output_stream.back(), /* etc */);
refresh_screen();
} |
This is the first step towards decoupling OS-specific process functions so they can be used from a single module across any supported OS.
I've tested on macOS and Linux, and until someone can test on Windows (or I can get access to a Windows environment) the old code paths will remain active via the conditional macros.
To avoid major problems and giant refactors, I will try and "stagger" the implementation of this over a series of updates / branches