inp.c, add variable 'controlswait'. If set, only then controls with

shared ngspice are executed after background thread has finished.
This commit is contained in:
Holger Vogt 2018-12-11 21:12:07 +01:00
parent e4aabc82c7
commit 9d9f415226
1 changed files with 8 additions and 2 deletions

View File

@ -947,12 +947,18 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
of commands. Thus this is delegated to a function using a third thread, that
only start when the background threas has finished (sharedspice.c).*/
#ifdef SHARED_MODULE
exec_controls(controls);
for (wl = controls; wl; wl = wl->wl_next)
if (cp_getvar("controlswait", CP_BOOL, NULL, 0)) {
exec_controls(wl_copy(wl));
break;
}
else
cp_evloop(wl->wl_word);
#else
for (wl = controls; wl; wl = wl->wl_next)
cp_evloop(wl->wl_word);
wl_free(controls);
#endif
wl_free(controls);
}
/* Now reset everything. Pop the control stack, and fix up the IO