diff options
author | David Robillard <d@drobilla.net> | 2022-08-10 12:52:18 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-17 13:50:57 -0400 |
commit | cc5527981ecc76398ec57097e79d5662e7b98151 (patch) | |
tree | fcb0a8b7807efa51e4e042b449e2f1c405548d38 /src | |
parent | e67d8439326d886315ccddd2d7a842df0c45359f (diff) | |
download | jalv-cc5527981ecc76398ec57097e79d5662e7b98151.tar.gz jalv-cc5527981ecc76398ec57097e79d5662e7b98151.tar.bz2 jalv-cc5527981ecc76398ec57097e79d5662e7b98151.zip |
Propagate worker errors to the scheduler when possible
Diffstat (limited to 'src')
-rw-r--r-- | src/worker.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/worker.c b/src/worker.c index c7b7143..a9474a7 100644 --- a/src/worker.c +++ b/src/worker.c @@ -93,7 +93,8 @@ jalv_worker_schedule(LV2_Worker_Schedule_Handle handle, uint32_t size, const void* data) { - JalvWorker* worker = (JalvWorker*)handle; + JalvWorker* worker = (JalvWorker*)handle; + LV2_Worker_Status st = LV2_WORKER_SUCCESS; if (!size) { return LV2_WORKER_ERR_UNKNOWN; @@ -107,12 +108,12 @@ jalv_worker_schedule(LV2_Worker_Schedule_Handle handle, } else { // Execute work immediately in this thread zix_sem_wait(worker->lock); - worker->iface->work( + st = worker->iface->work( worker->handle, jalv_worker_respond, worker, size, data); zix_sem_post(worker->lock); } - return LV2_WORKER_SUCCESS; + return st; } void |