diff options
author | Christopher Baines <mail@cbaines.net> | 2020-02-03 12:58:22 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-02-05 18:12:44 +0000 |
commit | bb225189fd56d89ec8be926dda269295ccbfe918 (patch) | |
tree | 37891b04d3e78730e615e20ec71e98af793c17a3 /tests/hello-subset.scm | |
parent | b9031db946ff89a39e1507b430f64402b0e9572a (diff) | |
download | cuirass-handle-errors-in-worker-threads.tar cuirass-handle-errors-in-worker-threads.tar.gz |
utils: Handle errors in worker threads.handle-errors-in-worker-threads
Previously, if an error occurred, the worker fiber simply never sends a
reply. In the case of HTTP requests to Cuirass, where an exception occurs when
performing a database query, the fiber handling the request blocks as it never
gets a response. I think that this has the potential to cause the process to
hit file descriptor limits, as the connections are never responded to.
This is fixed by responding with the details of the exception, and then
throwing it within the fiber that made the call.
* src/cuirass/utils.scm (make-worker-thread-channel): Catch exceptions when
calling proc.
(call-with-worker-thread): Handle receiving exceptions from the worker thread.
Diffstat (limited to 'tests/hello-subset.scm')
0 files changed, 0 insertions, 0 deletions