Simon Cruanes
3f720241b2
feat pool: use Shutdown when running a task after it's closed
2023-10-25 22:10:10 -04:00
Simon Cruanes
db33bec13f
wip: better work stealing pool
2023-10-25 12:11:41 -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
5680938a6c
fix: generalize type of create_arg
2023-08-01 12:34:13 -04:00
Simon Cruanes
8e9628ac81
prepare for 0.3
2023-07-16 23:36:34 -04:00
Simon Cruanes
858755e812
feat: add Pool.with_
2023-07-10 01:14:07 -04:00
Simon Cruanes
76ca0f2d88
feat: add Runner, change Pool to produce a Runner.t
...
futures, chans, etc. should use the `Runner.t` abstraction
and not depend on the exact pool implementation to run tasks.
For now `Pool.create` is the only implementation of a runner, but now
it's possible to implement alternatives.
2023-07-09 19:49:25 -04:00
Simon Cruanes
309424a58f
move fork join into its own module
2023-07-05 21:55:00 -04:00
Simon Cruanes
009855ce0d
feat: add Pool.fork_join
2023-07-05 21:55:00 -04:00
Simon Cruanes
9f04d254af
feat: Pool.run_wait_block can return a value now
2023-06-24 15:06:40 -04:00
Simon Cruanes
ab718b22f9
add Pool.run_wait_block; rename Pool.run into Pool.run_async
2023-06-24 14:50:43 -04:00
Simon Cruanes
fc3d2d2645
add around_task to Pool.create
2023-06-15 11:23:55 -04:00
Simon Cruanes
b451fde853
add Pool.shutdown_without_waiting
2023-06-15 10:52:17 -04:00
Simon Cruanes
059ee8a1d5
add Pool.num_tasks
2023-06-15 10:35:41 -04:00
Simon Cruanes
b084caea69
docs
2023-06-13 13:52:22 -04:00
Simon Cruanes
adfa1e62cb
fix(pool): make sure the work queue is closed properly
...
this way we can't submit new jobs after the pool has been shutdown.
2023-06-05 13:04:10 -04:00
Simon Cruanes
6ffbd15a34
add Pool.size
2023-06-02 12:05:39 -04:00
Simon Cruanes
4147d29383
doc
2023-06-01 22:45:40 -04:00
Simon Cruanes
d9eee6eb50
details
2023-06-01 22:34:14 -04:00
Simon Cruanes
d87dff529d
split into multiple files
2023-06-01 22:04:06 -04:00