Changeset: 112c721bd7ae for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/112c721bd7ae
Modified Files:
gdk/gdk_utils.c
Branch: Sep2022
Log Message:
Make gdk_nr_threads available in sys.env().
If it's set (via command line) at start up, the value is already used,
now also set it when we figure it out ourselves.
diffs (19 lines):
diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -1088,8 +1088,14 @@ GDKinit(opt *set, int setlen, bool embed
free(n);
GDKnr_threads = GDKgetenv_int("gdk_nr_threads", 0);
- if (GDKnr_threads == 0)
+ if (GDKnr_threads == 0) {
GDKnr_threads = MT_check_nr_cores();
+ snprintf(buf, sizeof(buf), "%d", GDKnr_threads);
+ if (GDKsetenv("gdk_nr_threads", buf) != GDK_SUCCEED) {
+ TRC_CRITICAL(GDK, "GDKsetenv gdk_nr_threads failed");
+ return GDK_FAIL;
+ }
+ }
if (!GDKinmemory(0)) {
if ((p = GDKgetenv("gdk_dbpath")) != NULL &&
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]