From d8e0d0b49d70b1e1e9453d81245f33a811f962e5 Mon Sep 17 00:00:00 2001 From: marcelb Date: Wed, 25 Sep 2024 22:40:46 +0200 Subject: [PATCH] Edit readme --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8f9683f..3bd722f 100644 --- a/README.md +++ b/README.md @@ -85,9 +85,9 @@ Make functions asynchronous * Run an lambda function asynchronously */ -asynco( []() { +nonsync ( []() { sleep_for(2s); // only for simulating long duration function - cout << "asynco" << endl; + cout << "nonsync " << endl; return 5; }); @@ -100,7 +100,7 @@ void notLambdaFunction() { cout << "Call to not lambda function" << endl; } -asynco (notLambdaFunction); +nonsync (notLambdaFunction); /** * Run class method @@ -114,7 +114,7 @@ class clm { }; clm classes; -asynco( [&classes] () { +nonsync ( [&classes] () { classes.classMethode(); }); @@ -124,9 +124,9 @@ asynco( [&classes] () { * Wait after runned as async */ -auto a = asynco( []() { +auto a = nonsync ( []() { sleep_for(2s); // only for simulating long duration function - cout << "asynco" << endl; + cout << "nonsync " << endl; return 5; }); @@ -136,7 +136,7 @@ cout << wait(a) << endl; * Wait async function call and use i cout */ -cout << wait(asynco( [] () { +cout << wait(nonsync ( [] () { sleep_for(chrono::seconds(1)); // only for simulating long duration function cout << "wait end" << endl; return 4;