Complete the A-to-Z Lardon3D maintenance and coherence pass. Generalize host resource policy, remove the global CPU12 ceiling, preserve host CPU/RAM reserves, scale Task capabilities through the Resource Governor, and validate deterministic parallel GV execution. Migrate Project DB to v23 with data-driven camera, lens, optical configuration and calibration profiles, including manual lenses without EXIF. Integrate safe optional LARDON SSD swap/scratch control with Governor and F10 drain/safe-to-unplug semantics. Refactor the ncurses TUI into a runtime observatory with durable progress, elapsed time, smoothed ETA, throughput, resource telemetry, Governor state, optics workflow, colors and compact/no-color fallbacks. Reconcile Queue lifetime, persistence, concurrency, comments, tests, README, AGENTS and canonical documentation. GLOBAL_MAINTENANCE_AUDIT=PASS/FROZEN
35 lines
1 KiB
C
35 lines
1 KiB
C
#include <stdio.h>
|
|
|
|
#include <lardon3d/project.h>
|
|
#include <lardon3d/runtime_session.h>
|
|
#include <lardon3d/task_queue.h>
|
|
|
|
bool
|
|
lardon3d_runtime_project_boundary(
|
|
Lardon3DAppState *state,
|
|
size_t queue_capacity
|
|
)
|
|
{
|
|
if (!state || !state->resource_governor || queue_capacity == 0) {
|
|
return false;
|
|
}
|
|
|
|
/* INVARIANT: callbacks may dereference Project DB until Queue destroy
|
|
* returns. Keeping state->task_queue published during destroy also
|
|
* preserves the documented read-only callback reentrancy window. */
|
|
lardon3d_task_queue_destroy(state->task_queue);
|
|
state->task_queue = NULL;
|
|
if (state->project_loaded || state->project_db) {
|
|
lardon3d_project_close(state);
|
|
}
|
|
|
|
state->task_queue = lardon3d_task_queue_create(
|
|
state->resource_governor, queue_capacity);
|
|
if (!state->task_queue) {
|
|
(void)snprintf(state->status_message,
|
|
sizeof(state->status_message),
|
|
"Erreur : impossible de recréer la file de tâches.");
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|