問題タブ [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.

0 投票する
2 に答える
768 参照

c++ - 非同期の 60 秒の遅延後に C++ で関数を実行しますか?

これはstd::this_thread::sleep_forstd::asyncを使用して達成できると読みましたが、うまくいきません。

呼び出される関数は次のとおりです。

これは別の関数から呼び出されます。以下のコードには、失敗した使用例が 2 つあります。

もともと、bool Log::r​​efresh_data()void Log::r​​efresh_data()でしたが、std::asyncは void 戻りが気に入らなかったようです...