Simon Cruanes
3d7e272d01
perf ws_deque: use bitmasks instead of modulo op
2023-10-25 09:57:05 -04:00
Simon Cruanes
78407c495d
more tests for WS_deque
2023-10-25 09:56:56 -04:00
Simon Cruanes
078adae786
limit CI time
2023-10-25 09:28:18 -04:00
Simon Cruanes
91c0c3f6c1
fix props
2023-10-25 01:01:51 -04:00
Simon Cruanes
ef05146e03
tweak retry thresholds in pool
2023-10-25 00:28:19 -04:00
Simon Cruanes
3bfc4cdcc7
more test
2023-10-25 00:28:16 -04:00
Simon Cruanes
73c2f9768c
benchs: run with both pool and simple_pool
2023-10-25 00:21:29 -04:00
Simon Cruanes
c03e342178
tests: run some tests on both Pool and Simple_pool
2023-10-25 00:21:07 -04:00
Simon Cruanes
e67ab53f9f
feat pool: rewrite main pool to use work stealing
...
there's a single blocking queue, and one WS_queue per worker. Scheduling
into the pool from a worker (e.g. via fork_join or explicitly) will push
into this WS queue; otherwise it goes into the main blocking queue.
Workers will always try to empty their local queue first, then try to
work steal, then block on the main queue.
2023-10-25 00:19:34 -04:00
Simon Cruanes
f2e9f99b36
perf ws_deque: implement shrinking and a push optim
2023-10-25 00:17:50 -04:00
Simon Cruanes
ae5f3a7e97
tests for ws_deque
2023-10-25 00:09:38 -04:00
Simon Cruanes
95b27b3a70
feat: add Ws_deque_
2023-10-25 00:09:28 -04:00
Simon Cruanes
0cec78eb30
refactor: move some common code to Suspend_
2023-10-25 00:09:09 -04:00
Simon Cruanes
4c4b720306
feat: add Simple_pool, with the naive single-queue implementation
2023-10-25 00:08:48 -04:00
Simon Cruanes
43eca1d4e2
restore test
2023-10-24 19:56:18 -04:00
Simon Cruanes
fb7cc5d69f
add heavier test for a particular hangup in fork join
2023-10-24 16:56:52 -04:00
Simon Cruanes
9ab9df78c9
update tests a bit
2023-10-24 13:48:23 -04:00
Simon Cruanes
d15bfb07f2
fix pool: rework scheduler to use one condition
2023-10-24 13:47:53 -04:00
Simon Cruanes
69faea0bcb
wip: have only one condition in pool
2023-10-24 12:53:19 -04:00
Simon Cruanes
60255c0e95
test: add dep on trace-tef; add new test for scheduling issues
...
trying to expose that sometimes, some workers might be asleep while
others do several tasks, because they're sleeping on the "wrong" queue
2023-10-24 10:03:46 -04:00
Simon Cruanes
faeb95b49d
fix pool: on shutdown, finish reading from all queues
2023-10-24 09:53:18 -04:00
Simon Cruanes
b8a31b088f
fix @since tags
2023-10-19 11:08:28 -04:00
Simon Cruanes
d37733b5bd
add tests for Bounded_queue
2023-10-12 22:24:28 -04:00
Simon Cruanes
d60e830e90
fixes for blocking queue
2023-10-12 22:24:28 -04:00
Simon Cruanes
3e8e734cf7
doc
2023-10-12 22:24:28 -04:00
Simon Cruanes
39d4e61331
some doc
2023-10-12 22:24:28 -04:00
Simon Cruanes
3834bf0796
add Bounded_queue
2023-10-12 22:24:28 -04:00
Simon Cruanes
4059903e09
moonpool: update interface of Blocking_queue
2023-09-14 22:32:58 -04:00
Simon Cruanes
ace43c0852
add Bb_queue.transfer
2023-09-14 22:30:44 -04:00
Simon Cruanes
f90773a99a
add Bb_queue.to_{iter,gen,seq}
2023-09-12 23:07:04 -04:00
Simon Cruanes
2800a3e0a6
CI: use 5.0 to generate online docs
2023-08-29 14:34:11 -04:00
Simon Cruanes
43ca60ff15
prepare for 0.4
2023-08-29 14:26:55 -04:00
Simon Cruanes
2068088255
some comments
2023-08-29 14:26:55 -04:00
Simon Cruanes
0345b65fb4
fix build on < 5.0
2023-08-29 14:22:14 -04:00
Simon Cruanes
c4bbec092a
chore: add dune-workspace file
2023-08-29 14:22:14 -04:00
Simon Cruanes
c1b6312cad
Update src/d_pool_.ml
2023-08-29 14:22:13 -04:00
David Allsopp
c0db72b40c
Quickly hacked version joining a previous domain
...
Ensure domains have been cleaned up before re-using a slot.
2023-08-29 14:22:13 -04:00
Simon Cruanes
25d42d5b8c
doc
2023-08-29 14:22:13 -04:00
Simon Cruanes
d381b1dd12
CI for docs
2023-08-29 14:22:13 -04:00
Simon Cruanes
0f670c47d3
perf: in Bb_queue, only signal condition on push if queue was empty
2023-08-23 21:31:42 -04:00
Simon Cruanes
18d5bad2a9
domain pool: let domains live a bit longer
...
this is an optimization to ensure we don't stop/start domains too often,
which harms performance really badly.
2023-08-13 22:48:04 -04:00
Simon Cruanes
cfbcc72648
improve a bit the resource test
2023-08-13 22:47:54 -04:00
Simon Cruanes
ed531e68e1
fix: race condition in shutdown, we need to wait for domain to quit
...
risk is a tight loop of `Pool.with_`, where by not waiting for the pool
to entirely shutdown (including the domains, potentially) we risk
running out of domains in the next iterations.
2023-08-13 22:24:18 -04:00
Simon Cruanes
6c4d2cbc79
test for proper resource handling in Pool.shutdown
2023-08-13 22:24:14 -04:00
Simon Cruanes
7b0e7de94d
Merge pull request #8 from c-cube/wip-7
...
full lifecycle for worker domains
2023-08-13 17:47:58 -04:00
Simon Cruanes
e38ee31b93
bugfix: forgot to dispose of the worker state on winding down
2023-08-12 22:07:08 -04:00
Simon Cruanes
9db0a9fe28
full lifecycle for worker domains
...
domains can now stop when all worker threads running on them are done
2023-08-12 14:09:35 -04:00
Simon Cruanes
5680938a6c
fix: generalize type of create_arg
2023-08-01 12:34:13 -04:00
Simon Cruanes
aa0dea3e34
add Fut.{reify_error,bind_reify_error}
2023-07-26 16:22:42 -04:00
Simon Cruanes
d18e88a772
details in test
2023-07-17 10:54:47 -04:00