0ad/source/simulation2
phosit f5b416c63b Don't execute the task when no Future awaits it anymore
Summary:
Most of the times the callback stores a reference to a variable in scope
where the `Future` is in. When the scope is left the reference get's
dangling. `CancelOrWait` is called in multiple places (mostly
destructors) to ensure the callback isn't executed anymore.
This patch deduplicates thous calls to `CancelOrWait`.

Refs: #5874

Comments by: @Stan, @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D5208
This was SVN commit r28128.
2024-06-25 19:03:01 +00:00
..
components Don't execute the task when no Future awaits it anymore 2024-06-25 19:03:01 +00:00
docs Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
helpers Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
scripting Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
serialization Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
system Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
tests Don't use std::shared_ptr<ScriptContext> in the CSimulation2 2024-03-08 17:15:25 +00:00
MessageTypes.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
Simulation2.cpp Don't use std::shared_ptr<ScriptContext> in the CSimulation2 2024-03-08 17:15:25 +00:00
Simulation2.h Don't use std::shared_ptr<ScriptContext> in the CSimulation2 2024-03-08 17:15:25 +00:00
TypeList.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00