Commit graph

25 commits

Author SHA1 Message Date
4f0eafef0a Resource pool max waiters and destroy changes
Add the ability to specify the max number of waiters for a resource
pool, this provides a more efficient way of avoiding waiters for a
resource pool continually rising.

This commit also improves the destroy behaviour.
2025-04-27 09:41:56 +01:00
e1858dfff5 Remove the web-server exception handler
This turned out not to be useful, since I wanted to handle exceptions
happening in the exception handler, so it didn't really help in the
end to allow customising it.
2025-03-14 14:51:42 +00:00
a73fd1ca50 Add a fibers-parallel test 2025-03-10 21:33:29 +00:00
e3bc3c12b0 Add some helpers for handling request bodies 2025-03-08 10:15:25 +00:00
4e33da98aa Fix some exception handling issues 2025-03-08 09:39:27 +00:00
a6c96aa1da Better handle the web server exception handler not returning 2 values 2025-03-03 10:56:36 +00:00
ed4113af51 Simplify and extend using the knots exception with stack 2025-02-27 13:22:36 +00:00
cb2085b684 Make more web server encoding tweaks 2025-02-07 16:09:42 +00:00
6337103525 Remove the resource pool reply timeout
By being smarter about how long to wait for replies.
2025-02-04 13:16:38 +00:00
a11cd24e57 Improve resource pool performance when there are lots of waiters 2025-02-04 13:16:10 +00:00
bddc6c04ad Fix idle resource removal in the resource pool 2025-02-03 12:16:16 +01:00
41974a6817 Rework handling of using a proc for the web server response body
To address encoding issues and improve exception handling.
2025-02-03 11:25:11 +01:00
2910e66150 Fix issue with parallel creating resource pool resources 2025-02-02 11:29:25 +01:00
61451907a9 Improve resource pool destruction 2025-01-31 12:33:50 +01:00
c641c19ce4 Call web server exception handlers with the request
So that this can be used when reporting the exception.
2025-01-29 16:18:15 +00:00
c90cc88da7 Add fibers-promise-result-available? 2025-01-29 16:16:35 +00:00
42d885c553 Try to better handle exceptions in the web server 2025-01-23 09:34:54 +01:00
d572f591a3 Rename worker threads to thread pool
I think this needs more work, maybe the thread pool should be more
similar to the resource pool, but I think the name change is still
helpful.

Maybe there's a need for a variable size thread pool and that can
better integrate with the work queue.
2025-01-14 10:05:06 +00:00
dcb56ee2c5 Tweak the resource pool
Mostly to no longer sleep in the main fiber. Now the main fiber just
spawns other fibers when it would previously block on put-operation
and these other fibers communicate back to the main resource pool
fiber when necessary.

This should mean that the resource pool is more responsive.
2025-01-09 09:34:11 +00:00
97a3116b81 Support getting the pool from the timeout error 2025-01-06 19:06:28 +00:00
7e55db0de7 Consistently use non-blocking 2024-12-29 10:45:31 +00:00
4e564b4814 Allow nesting worker thread calls
Incorporating changes from the nar-herder.
2024-12-28 10:44:12 +00:00
4e791aff68 Fix a bug in fibers-batch-map (and related procedures)
And add more tests.
2024-12-27 22:14:51 +00:00
dc2fe732ea Make the parallel operations more continuous
Instead of batching the list items, change the batch size to a
parallelism limit and run up to that many fibers. When the processing
of one list item finishes, another will then start immediately after,
rather than when the whole batch is finished.

These changes also make the fibers-map and fibers-for-each operations
work with vectors as well as lists.
2024-12-22 12:24:49 +00:00
2f39c58d6c Initial commit 2024-12-16 09:18:12 +00:00