Simon Cruanes
a13144810e
remove dep on now defunct exn_bt
2024-09-03 09:32:10 -04:00
Simon Cruanes
3df7c8bef9
update to merged picos PR
2024-09-03 09:07:08 -04:00
Simon Cruanes
12978d424d
fix
2024-08-30 13:29:32 -04:00
Simon Cruanes
76a881ebc9
fix: LS.get shouldn't raise
2024-08-30 13:28:54 -04:00
Simon Cruanes
3193a259ad
fix: catch TLS.Not_set
2024-08-30 13:27:04 -04:00
Simon Cruanes
164440fdd9
feat: add Fls.with_in_local_hmap
2024-08-30 12:51:16 -04:00
Simon Cruanes
940ab83dd6
fix
2024-08-30 12:42:02 -04:00
Simon Cruanes
0545a39aff
add Task_local_storage.remove_in_local_hmap
2024-08-30 09:46:49 -04:00
Simon Cruanes
7df8c069ed
refactor: move optional hmap FLS stuff into core/task_local_storage
2024-08-30 09:43:41 -04:00
Simon Cruanes
8712fc5b51
use exn_bt, not picos.exn_bt
2024-08-29 15:43:50 -04:00
Simon Cruanes
21f34473b0
fixes after reviews
2024-08-29 13:08:43 -04:00
Simon Cruanes
a36342dce2
fix pool: only return No_more_tasks when local and global q empty
2024-08-29 09:36:13 -04:00
Simon Cruanes
b0e4fa4563
fix fut: trigger failing to attach doesn't signal it
2024-08-29 09:36:13 -04:00
Simon Cruanes
07a7fc3a1c
wip: port to picos
2024-08-29 09:36:12 -04:00
Simon Cruanes
a0068b09b3
details
2024-08-29 09:35:16 -04:00
Simon Cruanes
e1105f4a88
feat fut: add on_result_ignore
2024-08-29 09:35:16 -04:00
Simon Cruanes
9fb23bed4c
refactor core: use picos for schedulers; add Worker_loop_
...
we factor most of the thread workers' logic in `Worker_loop_`,
which is now shared between Ws_pool and Fifo_pool
2024-08-29 09:35:16 -04:00
Simon Cruanes
2780b156eb
detail in fut
2024-08-29 09:35:16 -04:00
Simon Cruanes
b9c3e1fc7e
feat fut: wrap picos computations
2024-08-29 09:35:16 -04:00
Simon Cruanes
f93248a867
wip: use picos computations
2024-08-29 09:35:16 -04:00
Simon Cruanes
465919ae34
non optional dependency on thread-local-storage
...
it's a dep of picos anyway
2024-08-29 09:35:16 -04:00
Simon Cruanes
dd60666676
refactor: remove dla
2024-08-29 09:35:16 -04:00
Simon Cruanes
f1ff17dbd6
feat: depend on picos, use picos.exn_bt
2024-08-29 09:35:16 -04:00
Simon Cruanes
e3f11be0b3
fix related to TLS
2024-08-27 10:15:40 -04:00
Simon Cruanes
265d4f73dd
move to thread-local-storage 0.2 with get/set API
2024-08-16 10:07:51 -04:00
Simon Cruanes
0750e6af41
prepare for 0.6
2024-04-02 12:51:57 -04:00
Simon Cruanes
ac851a6d81
fix: in Fut.await, upon failure, use resume
...
otherwise a fairly vicious bug happens: the await-er is resumed on the
current runner, not its native one, which can cause deadlocks as it
breaks the executors' dependency DAG. When using `resume` there is no
bug since `resume` is designed to always schedule on the correct runner.
2024-04-02 12:51:57 -04:00
Simon Cruanes
0d325741f4
add Exn_bt.pp
2024-04-02 12:51:57 -04:00
Simon Cruanes
f798420423
doc
2024-03-04 22:56:41 -05:00
Simon Cruanes
867444d975
perf: add Fut.raise_if_failed, use it in Fiber.check_if_cancelled
2024-03-04 22:05:47 -05:00
Simon Cruanes
3bdd269ca3
more docs, rename a function
2024-03-04 21:02:23 -05:00
Simon Cruanes
ad4ddc6816
refactor: split off domain pool to moonpool.dpool
2024-03-04 20:57:49 -05:00
Simon Cruanes
9df848cd17
breaking: remove Immediate_runner
...
it never really supported all that a runner should (effects, scheduling
other tasks, etc.)
2024-03-04 20:49:34 -05:00
Simon Cruanes
25104ce3b7
feat fifo: expose private interface for the main runner threads
2024-03-04 20:49:34 -05:00
Simon Cruanes
51459f9b0b
feat: add Runner.dummy
2024-03-04 20:49:34 -05:00
Simon Cruanes
8c10c2b329
expose Task_local_storage.get_current
2024-03-04 20:49:34 -05:00
Simon Cruanes
45b8aa9999
cleanup the local storage APIs
2024-03-04 20:49:34 -05:00
Simon Cruanes
953947f694
feat local-storage: expose get/set with explicit storage
2024-03-04 20:49:34 -05:00
Simon Cruanes
37751c79e4
introduce Fiber.Nursery.t; change local storage accordingly
2024-03-04 20:49:34 -05:00
Simon Cruanes
4195d4d61c
feat: add Task_local_storage.get_opt
2024-02-29 15:29:08 -05:00
Simon Cruanes
a2ea24551b
compat
2024-02-27 22:48:23 -05:00
Simon Cruanes
42d16465c3
compat
2024-02-27 22:35:07 -05:00
Simon Cruanes
c39435d8eb
fix fifo_pool: resume can be called from another worker
...
we might schedule on worker 1, suspend, resume on worker 2,
and resume from there.
2024-02-27 22:31:25 -05:00
Simon Cruanes
bfd70dc5c2
fix fiber: spawn sub-fiber with a copy of current local storage
2024-02-27 22:11:50 -05:00
Simon Cruanes
856dc85d41
refactor ws_pool: do not nest effect handlers; fixes
...
- we differentiate between starting a task and resuming a task
- we dynamically find if we're on one of the pool's runner
in `resume`/`run_another_task` in the main suspend handler
(this way we can use the local work stealing queue
if we're in the same pool, even if we're not on the
worker that ran the "suspend" call itself)
2024-02-27 21:23:37 -05:00
Simon Cruanes
b9cf0616b8
fifo pool: format, use with_suspend unconditionally
2024-02-27 21:23:02 -05:00
Simon Cruanes
e94c7999de
suspend: provide dummy with_suspend_handler on 4.xx
2024-02-27 21:22:48 -05:00
Simon Cruanes
ed171c1171
fix ws_pool: make sure we capture the current worker before suspend
2024-02-23 20:54:51 -05:00
Simon Cruanes
83ae0e7a4e
do not expose ?ls for Fut.spawn
2024-02-20 13:51:41 -05:00
Simon Cruanes
8614d4be40
simplify implem for background_thread for now
2024-02-20 13:45:05 -05:00