Commit graph

121 commits

Author SHA1 Message Date
f64e435b57 Use start-stack in fibers-force
Some checks failed
/ test (push) Has been cancelled
Otherwise the backtraces are more confusing.
2025-12-06 10:09:01 +00:00
a8e07b738b Fix a resource pool bug with idle seconds
Some checks failed
/ test (push) Has been cancelled
Actually perform the choice operation.
2025-11-26 10:06:20 +00:00
05f7daf0e9 Add another resource pool test 2025-11-26 10:06:09 +00:00
9c123bbfa9 Fix listing resource pool resources 2025-11-25 14:26:39 +00:00
8100d36aa5 Avoid errors about returning no values from a exception handler
Some checks are pending
/ test (push) Waiting to run
2025-11-25 09:58:58 +00:00
9cce89fc01 Change how spawn-fiber-to-destroy-resource is used
And fix a couple of incorrect uses.
2025-11-25 09:58:45 +00:00
04d964a9f8 Fix adding the resource id to the available list
Some checks are pending
/ test (push) Waiting to run
2025-11-25 09:37:29 +00:00
3eba6fc820 Rework the resource pool implementations
Some checks are pending
/ test (push) Waiting to run
Don't rely on resource equality for keeping track of resources and
make some other tweaks.
2025-11-24 21:54:00 +00:00
d07e309566 Fix a bug with resource pool idle checking
The fiber would never finish.
2025-11-24 17:06:27 +00:00
95200eccfd Fix fixed size thread pool lifetimes
Some checks failed
/ test (push) Has been cancelled
2025-11-19 15:59:18 +00:00
05ad83c703 Implement lifetime support for thread pools
Some checks failed
/ test (push) Has been cancelled
2025-11-17 11:37:26 +00:00
1a476b5aa8 Implement lifetime support in the resource pool 2025-11-17 11:37:10 +00:00
e78e41b542 Pass through default-max-waiters in make-thread-pool 2025-11-17 11:19:30 +00:00
2446078657 Fix updating the thread-proc-vector in thread pools 2025-11-17 11:19:01 +00:00
a13098494d Fix a bug where resources pools could empty with waiters 2025-11-17 11:18:23 +00:00
40b64e269b Fix resources-last-used inconsistency 2025-11-17 11:18:16 +00:00
86fb460d6a Simplify using the waiters queue in the resource pool
Use a custom dequeue procedure that returns #f rather than raising an
exception on an empty queue.
2025-11-17 11:18:16 +00:00
52092e7a99 Fix call to documenta
All checks were successful
/ test (push) Successful in 8s
2025-07-10 16:15:58 +01:00
4468a3ef6d Generate documentation for (knots) as well
All checks were successful
/ test (push) Successful in 24s
As enabled by Guile Documenta 0.4.
2025-07-10 16:11:45 +01:00
d18b5b8d5d Don't loop inside exception handlers
All checks were successful
/ test (push) Successful in 9s
The resource pools seemed to become slower and slower over time, this
might help?
2025-07-09 12:06:20 +01:00
f4b48a1499 Avoid calling deq! if the queue is empty
All checks were successful
/ test (push) Successful in 9s
2025-07-06 18:49:09 +01:00
ec2f2489a2 Fix resource pool bug
All checks were successful
/ test (push) Successful in 9s
And remove unnecessary named let.
2025-07-01 23:13:31 +01:00
ff93dc1442 Add a post-request-hook to the web server
All checks were successful
/ test (push) Successful in 11s
2025-07-01 12:45:12 +01:00
ce1b710bcf Use a queue for the resource pool waiters
All checks were successful
/ test (push) Successful in 8s
As this will maybe improve performance.
2025-06-30 22:57:08 +01:00
7709ffe1d3 Tweak the knots chunked output port
All checks were successful
/ test (push) Successful in 9s
To try and reduce the number of write syscalls.
2025-06-30 15:41:04 +02:00
deae518b52 Use the buffer size for chunked output ports
All checks were successful
/ test (push) Successful in 37s
2025-06-29 08:35:28 +02:00
0fa6737a39 Document some things
All checks were successful
/ test (push) Successful in 9s
2025-06-27 23:28:47 +02:00
4140ef0bd6 More consistently handle results and exceptions
In the parallelism module.
2025-06-27 22:43:25 +02:00
6f6d57b189 Use the knots backtrace printer for tests
All checks were successful
/ test (push) Successful in 11s
2025-06-27 00:16:41 +02:00
d8f64399cd Tweak spacing 2025-06-27 00:16:37 +02:00
163d775496 Fix record-predicate that should be exception-predicate 2025-06-27 00:16:18 +02:00
8f3e0a9a1d Fix exception handling in fibers-map-with-progress
All checks were successful
/ test (push) Successful in 9s
2025-06-26 22:53:15 +02:00
09ca6cfb6b Fix resource-pool-destroy-resource-exception
Raising the exception is more consistent, and avoids returning the
resource.
2025-06-26 21:27:32 +02:00
ab5411da42 Make resource pool changes and add parallelism limiter
All checks were successful
/ test (push) Successful in 9s
This was motivated by trying to allow for completely cleaning up
resource pools, which involved removing their use of fiberize which
currently has no destroy mechanism.

As part of this, there's a new parallelism limiter mechanism using
resource pools rather than fibers, and also a fixed size resource
pool.

The tests now drain? and destroy the resource pools to check cleaning
up.
2025-06-26 10:43:46 +02:00
edf62414ee Avoid workflow erroring if there's nothing to change
All checks were successful
/ test (push) Successful in 12s
2025-06-24 21:14:52 +02:00
2e25c3b074 Add workflow for building the website
Some checks failed
/ test (push) Failing after 14s
2025-06-24 21:07:29 +02:00
1b7732c958 Add manual index 2025-06-24 20:58:04 +02:00
f7eae5a3bc Add texinfo to guix-dev.scm 2025-06-24 20:50:44 +02:00
7d31d5163d Add guile-documenta as a native input 2025-06-24 13:10:17 +02:00
5663a5f2e9 Address exception naming inconsistencies 2025-06-21 09:43:52 +01:00
8f669f133f
Fix typo 2025-06-18 13:22:03 +03:00
78d22d1acc Tweak display of stack traces
Tweak the frames to display and try to harden the code to crash less.
2025-06-09 12:19:56 +01:00
123c920122 Export sanitize-response
As this is useful.
2025-06-09 12:19:32 +01:00
8e582a2d73 Improve promise exception reporting
And guard against calling fibers-force not on a fibers promise record.
2025-05-26 14:50:45 +01:00
cbafdb8668 Respect use-default-io-waiters? for the fixed size thread pools 2025-05-25 15:34:07 +01:00
016f37f108 Rework thread pools
Allow the thread pool to vary in size by basing it on a resource pool
of fixed size thread pools, which are similar to the previous thread
pool implementation.

Fixed size thread pools don't require fibers, but thread pools now
do. Some procedures work with either thread pool implementation.
2025-05-19 09:06:08 +01:00
7ba77010ae Handle %stacks not being a pair
Not sure when this would happen, but guard against it.
2025-05-15 09:26:29 +01:00
8c63ed7b4e Support listing resource pool resources 2025-05-15 09:24:28 +01:00
838ee6f1e3 Enable destroying individual resources in a resource pool 2025-05-15 09:24:28 +01:00
1dca6d755e Allow specifying the resource-pool-channel 2025-04-27 10:52:36 +01:00