diff options
author | Christopher Baines <mail@cbaines.net> | 2023-04-24 09:04:17 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-04-24 09:04:17 +0100 |
commit | 579ac66fcb263bd3a9086c264847abf748c02a40 (patch) | |
tree | b325009904040f29c62a34a49990f8be9b72c776 | |
parent | 28d0ca2690bfb01f6dea0e79cc4d28fdfa23b4b0 (diff) | |
download | build-coordinator-579ac66fcb263bd3a9086c264847abf748c02a40.tar build-coordinator-579ac66fcb263bd3a9086c264847abf748c02a40.tar.gz |
Make sure the writer thread sets up before the reader threads
-rw-r--r-- | guix-build-coordinator/datastore/sqlite.scm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm index 5772402..8b209b7 100644 --- a/guix-build-coordinator/datastore/sqlite.scm +++ b/guix-build-coordinator/datastore/sqlite.scm @@ -192,6 +192,12 @@ CREATE TABLE IF NOT EXISTS mem.build_allocation_plan ( "warning: database write delayed by ~1,2f seconds~%" seconds-delayed)))))) + ;; Make sure the worker thread has initialised, and created the in memory + ;; tables + (call-with-worker-thread + (slot-ref datastore 'worker-writer-thread-channel) + (const #t)) + (slot-set! datastore 'worker-reader-thread-channel |