問題タブ [stdasync]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c++ - 非同期の 60 秒の遅延後に C++ で関数を実行しますか?
これはstd::this_thread::sleep_forとstd::asyncを使用して達成できると読みましたが、うまくいきません。
呼び出される関数は次のとおりです。
これは別の関数から呼び出されます。以下のコードには、失敗した使用例が 2 つあります。
もともと、bool Log::refresh_data()はvoid Log::refresh_data()でしたが、std::asyncは void 戻りが気に入らなかったようです...