Skip to content
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

added run_async method #359

Merged
merged 4 commits into from
Mar 16, 2022
Merged

added run_async method #359

merged 4 commits into from
Mar 16, 2022

Conversation

The-EDev
Copy link
Member

also added unit tests for #358

Closes #351

also added unit tests for #358
mrozigor
mrozigor previously approved these changes Mar 10, 2022
@The-EDev
Copy link
Member Author

The-EDev commented Mar 11, 2022

CI is failing because it uses code from #358.

CI should be restarted once #358 is merged.

@crow-clang-format
Copy link

--- include/crow/app.h	(before formatting)
+++ include/crow/app.h	(after formatting)
@@ -307,7 +307,9 @@
         /// Non-blocking version of \ref run()
         std::future<void> run_async()
         {
-            return std::async(std::launch::async, [&] {this->run();});
+            return std::async(std::launch::async, [&] {
+                this->run();
+            });
         }
 
         /// Stop the server
--- tests/unittest.cpp	(before formatting)
+++ tests/unittest.cpp	(after formatting)
@@ -532,7 +532,7 @@
         return "B";
     });
 
-    auto _  = app1.bindaddr(LOCALHOST_ADDRESS).port(45451).run_async();
+    auto _ = app1.bindaddr(LOCALHOST_ADDRESS).port(45451).run_async();
     auto _2 = app2.bindaddr(LOCALHOST_ADDRESS).port(45452).run_async();
     app1.wait_for_server_start();
     app2.wait_for_server_start();

@The-EDev The-EDev merged commit a970167 into master Mar 16, 2022
@The-EDev The-EDev deleted the run_async branch March 16, 2022 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

run_async() method for App
2 participants