Simon Cruanes
cc8860c6e3
split into moonpool.private and moonpool; format; remove DLA
2024-02-11 16:39:43 -05:00
Simon Cruanes
e56dbc6a09
fix build
2024-02-07 15:49:01 -05:00
Simon Cruanes
27b213e30f
tracing: add optional name for pools
2024-02-07 13:31:48 -05:00
Simon Cruanes
092ad5f2ce
feat: support for trace as a depopt
...
one can now give tasks an optional string "name". If `Trace`
is present (installed) and enabled, this results in
a span around the task's execution. This also plays ok
with `await` and other effect-based primitives.
2024-01-30 16:10:11 -05:00
Simon Cruanes
2d306c91b2
fix too early exit in Ws_pool
...
when shutting down the pool, workers should check `self.active`
only when they have no local task, failed to steal tasks,
and found the main queue to be empty. Basically we check `self.active`
only just before we wait on the condition.
2023-11-24 23:12:22 -05:00
Simon Cruanes
0a432585c6
fix: in WS_pool, only schedule in worker queues in some cases
...
only do it if we actually want to spawn the task on pool A while running
on a worker of A (not a worker on B).
2023-11-08 12:02:13 -05:00
Simon Cruanes
6e6a2a1faa
feat runner: add get_current_runner
...
this relies on TLS to access the current pool really quickly.
2023-11-08 11:38:15 -05:00
Simon Cruanes
72f289af84
refactor: use a fixed size work-stealing deque
...
if it's full, tasks overflow into the main queue.
2023-11-08 11:36:10 -05:00
Simon Cruanes
80031c0a54
fix compilation error
2023-11-08 09:41:57 -05:00
Simon Cruanes
133a0d6128
breaking: change interface for number of threads
...
now the user can specify `num_threads`; if not provided a sensible
default is picked.
2023-11-08 09:41:57 -05:00
Simon Cruanes
aba0d84ecf
ws pool: random stealing; rework main state machine
...
in the state machine, after waiting, we check the main queue, else we
directly go to stealing.
2023-10-27 16:05:52 -04:00
Simon Cruanes
e67bffeca5
ws_pool: use TLS for quick worker storage access; reduce contention
2023-10-27 15:18:50 -04:00
Simon Cruanes
b4ddd82ee8
ws pool: use non atomic boolean to reduce number of wakeups; refactor
2023-10-27 14:48:13 -04:00
Simon Cruanes
c044fb8fc9
tweal to WS pool
2023-10-27 12:26:50 -04:00
Simon Cruanes
5409cf8e1b
compat 4.08
2023-10-25 23:50:34 -04:00
Simon Cruanes
3e614ec992
rename Pool to Ws_pool; deprecated Moonpool.Pool
2023-10-25 23:43:18 -04:00