Commit graph

15 commits

Author SHA1 Message Date
Simon Cruanes
9b3c75124e
simon/move to picos (#30)
* feat: depend on picos, use picos.exn_bt

* refactor: remove dla

* non optional dependency on thread-local-storage

it's a dep of picos anyway

* wip: use picos computations

* disable t_fib1 test, way too flaky

* feat `fut`: wrap picos computations

* detail in fut

* gitignore

* 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

* github actions

* feat fut: add `on_result_ignore`

* details

* wip: port to picos

* test: wip porting tests

* fix fut: trigger failing to attach doesn't signal it

* fix pool: only return No_more_tasks when local and global q empty

* format

* chore: fix CI by installing picos first

* more CI

* test: re-enable t_fib1 but with a single core fifo pool

it should be deterministic now!

* fixes after reviews

* bump minimal OCaml version to 4.13

* use `exn_bt`, not `picos.exn_bt`

* feat: optional dep on hmap, for inheritable FLS data

* format

* chore: depend on picos explicitly

* feat: move hmap-fls to Fiber.Fls

* change API for local FLS hmap

* refactor: move optional hmap FLS stuff into core/task_local_storage

* add Task_local_storage.remove_in_local_hmap

* chore: try to fix CI

* format

* chore: CI

* fix

* feat: add `Fls.with_in_local_hmap`

* chore: depend on hmap for tests

* fix test for FLS

use the inheritable keys

* chore: CI

* require OCaml 4.14 :/

* feat: add `moonpool.sync` with await-friendly abstractions

based on picos_sync

* fix: catch TLS.Not_set

* fix: `LS.get` shouldn't raise

* fix

* update to merged picos PR

* chore: CI

* fix dep

* feat: add `Event.of_fut`

* chore: CI

* remove dep on now defunct `exn_bt`

* feat: add moonpool-io

* chore: CI

* version constraint on moonpool-io

* add Event.Infix

* move to picos_io
2024-09-04 12:04:27 -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
3bdd269ca3
more docs, rename a function 2024-03-04 21:02:23 -05:00
Simon Cruanes
45b8aa9999 cleanup the local storage APIs 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
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
ed171c1171
fix ws_pool: make sure we capture the current worker before suspend 2024-02-23 20:54:51 -05:00
Simon Cruanes
cf8555bcec
revert: remove name on futures and tasks
async tracing will be more robust, and is enabled by
task local storage
2024-02-17 12:40:02 -05:00
Simon Cruanes
2a42f15e37
feat: pass task local storage in run_async
the idea is that we could use this to pass storage
around in `Fut` combinators, but I'm not sure that's actually
a good idea.
2024-02-14 14:54:18 -05:00
Simon Cruanes
712a030206
refactor: streamline suspend, make most of it 5.0-dependent 2024-02-11 16:40:15 -05:00
Simon Cruanes
f7449416e4
restore DLA 2024-02-11 16:40:15 -05:00
Simon Cruanes
e8cc87f1f5
fixes 2024-02-11 16:40:14 -05:00
Simon Cruanes
65fd89708e
add task_local_storage to core, modify how suspend works 2024-02-11 16:40:14 -05:00
Simon Cruanes
b0fe279f42
more internal refactor 2024-02-11 16:39:44 -05:00
Simon Cruanes
cc8860c6e3
split into moonpool.private and moonpool; format; remove DLA 2024-02-11 16:39:43 -05:00
Renamed from src/ws_pool.ml (Browse further)