aboutsummaryrefslogtreecommitdiff
path: root/include/core.h
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2024-10-04 08:40:39 -0400
committerGitHub <noreply@github.com>2024-10-04 08:40:39 -0400
commitd7e3deba72703ad36c497f5becf6772ca00a0d6d (patch)
treeeff3b2ec3dcc31126041529c8e00a714997f2d7b /include/core.h
parent9691ccf51b3efd8113e9620c4afa8b5382d7f161 (diff)
parentf0ba8cd378a460f927644e41f49be95d0e956f81 (diff)
downloadstasis-d7e3deba72703ad36c497f5becf6772ca00a0d6d.tar.gz
Merge pull request #46 from jhunkeler/split-delivery-code
Add multiprocessing / Split delivery code
Diffstat (limited to 'include/core.h')
-rw-r--r--include/core.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/include/core.h b/include/core.h
index ef90e96..e09b212 100644
--- a/include/core.h
+++ b/include/core.h
@@ -21,6 +21,8 @@
#define HTTP_ERROR(X) X >= 400
#include "config.h"
+#include "core_mem.h"
+#include "multiprocessing.h"
#include "envctl.h"
#include "template.h"
#include "utils.h"
@@ -42,16 +44,6 @@
#include "github.h"
#include "template_func_proto.h"
-#define guard_runtime_free(X) do { if (X) { runtime_free(X); X = NULL; } } while (0)
-#define guard_strlist_free(X) do { if ((*X)) { strlist_free(X); (*X) = NULL; } } while (0)
-#define guard_free(X) do { if (X) { free(X); X = NULL; } } while (0)
-#define GENERIC_ARRAY_FREE(ARR) do { \
- for (size_t ARR_I = 0; ARR && ARR[ARR_I] != NULL; ARR_I++) { \
- guard_free(ARR[ARR_I]); \
- } \
- guard_free(ARR); \
-} while (0)
-
#define COE_CHECK_ABORT(COND, MSG) \
do {\
if (!globals.continue_on_error && COND) { \
@@ -71,6 +63,10 @@ struct STASIS_GLOBAL {
bool enable_testing; //!< Enable package testing
bool enable_overwrite; //!< Enable release file clobbering
bool enable_rewrite_spec_stage_2; //!< Enable automatic @STR@ replacement in output files
+ bool enable_parallel; //!< Enable testing in parallel
+ long cpu_limit; //!< Limit parallel processing to n cores (default: max - 1)
+ long parallel_fail_fast; //!< Fail immediately on error
+ int pool_status_interval; //!< Report "Task is running" every n seconds
struct StrList *conda_packages; //!< Conda packages to install after initial activation
struct StrList *pip_packages; //!< Pip packages to install after initial activation
char *tmpdir; //!< Path to temporary storage directory