Run variations calculation in background

but there are still side effects and thus it crashes.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2017-08-29 11:41:30 +02:00
parent be6b50fce4
commit a9ceecc2e3
6 changed files with 35 additions and 1 deletions

View file

@ -990,6 +990,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru
if (!in_planner())
deco_state->deco_time = 0;
struct deco_state *cache_data_initial = NULL;
lock_planner();
/* For VPM-B outside the planner, cache the initial deco state for CVA iterations */
if (decoMode() == VPMB) {
cache_deco_state(&cache_data_initial);
@ -1135,6 +1136,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru
#if DECO_CALC_DEBUG & 1
dump_tissues();
#endif
unlock_planner();
}
#endif