Commit graph

40 commits

Author SHA1 Message Date
Simon Cruanes
ee7972910f
breaking: remove around_task from schedulers 2025-11-12 00:25:02 -05:00
Simon Cruanes
f9ab951c36
remove moonpool.fib
it's complicated and hard to use in practice, because it's not obvious
if a piece of code is running under another fiber or not, so
`Fiber.spawn` might fail because it has no parent.

So in practice we've been using `Fiber.spawn_top`… which has no
interest over just using `Fut.spawn`.
2025-10-25 21:50:46 -04:00
Simon Cruanes
92300ad698
fix: make Moonpool_lwt.fut_of_lwt idempotent
Some checks failed
github pages / Deploy doc (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / build-compat (push) Has been cancelled
Build and Test / format (push) Has been cancelled
this way the resulting future can be cancelled/fulfilled from
the outside without crashing Lwt
2025-10-07 13:53:54 -04:00
Simon Cruanes
538f3df31a
doc correction
Some checks failed
github pages / Deploy doc (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / build-compat (push) Has been cancelled
Build and Test / format (push) Has been cancelled
2025-10-02 14:37:15 -04:00
Simon Cruanes
0e5a2896ef
prepare for 0.9
Some checks are pending
github pages / Deploy doc (push) Waiting to run
Build and Test / build (push) Waiting to run
Build and Test / build-compat (push) Waiting to run
Build and Test / format (push) Waiting to run
2025-09-29 08:51:42 -04:00
Simon Cruanes
64c3442078
more doc 2025-09-26 15:44:21 -04:00
Simon Cruanes
2dbbad4ef2
refactor moonpool_lwt 2025-09-26 14:55:26 -04:00
Simon Cruanes
677ae5c36a
perf: fast path for Moonpool_lwt.run_in_lwt_and_await 2025-09-26 14:55:26 -04:00
Simon Cruanes
4e19719c4f
modify signature for Moonpool_lwt.run_in_lwt_and_await 2025-09-26 14:55:26 -04:00
Simon Cruanes
8bd79c70b5
add Moonpool_lwt.on_lwt_thread 2025-09-26 14:55:26 -04:00
Simon Cruanes
f245f4913c
add Moonpool_lwt.spawn_lwt_ignore 2025-09-26 14:55:26 -04:00
Simon Cruanes
86b64ae3d4
fix lwt: make sure to wakeup loop in main
there's a race condition where, by the time we schedule the
main fiber in `lwt_main`, the event loop is already asleep (maybe
from a previous run). We make sure to wake the loop up.
2025-09-26 14:55:25 -04:00
Simon Cruanes
01026fafaa
doc 2025-09-26 14:55:25 -04:00
Simon Cruanes
9e814ecb48
lwt: handle fibers in moonpool_lwt 2025-09-26 14:55:25 -04:00
Simon Cruanes
e3be2aceaa
feat lwt: make sure we can setup/cleanup multiple times 2025-09-26 14:55:25 -04:00
Simon Cruanes
1eef212a3e
more sanity checks 2025-09-26 14:55:25 -04:00
Simon Cruanes
122b3a6b06
feat lwt: make most functions work on any thread, not just the main 2025-09-26 14:55:25 -04:00
Simon Cruanes
6ae82f130a
feat lwt: proper wakeup; add lwt_main_runner 2025-09-26 14:55:25 -04:00
Simon Cruanes
796c4f6f31
feat lwt: improvements 2025-09-26 14:55:25 -04:00
Simon Cruanes
6c4fb69d23
wip: lwt 2025-09-26 14:55:24 -04:00
Simon Cruanes
295f22e770
wip: lwt 2025-09-26 14:55:24 -04:00
Simon Cruanes
bf90c32c86
wip lwt: event loop for moonpool directly inside lwt 2025-09-26 14:55:24 -04:00
Simon Cruanes
bb9418d86a
format with 0.27 2025-05-02 10:58:50 -04:00
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
a4db1e67be
chore: use 5.2 in CI (#28)
chore: use 5.2 in CI
2024-05-20 16:26:33 -04:00
Simon Cruanes
0750e6af41
prepare for 0.6 2024-04-02 12:51:57 -04:00
Simon Cruanes
a99c0775e2
format dune files 2024-04-02 12:51:57 -04:00
Simon Cruanes
5817a8aee7 revert nurseries 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
8bfe76b3e0
improve docs for moonpool_lwt; fix race condition 2024-02-17 12:40:36 -05:00
Simon Cruanes
0df0642dd1
lwt: add TCP client/server functions that use lwt channels 2024-02-17 12:40:36 -05:00
Simon Cruanes
b991a78f3e
lwt: trace the function that performs actions in batch 2024-02-17 12:40:36 -05:00
Simon Cruanes
36c6e8e900
fix build, remove some debug 2024-02-17 12:40:36 -05:00
Simon Cruanes
6bf58e3e62
perf: quicker check for [] 2024-02-17 12:40:36 -05:00
Simon Cruanes
e0f5b5bbcb
fix build 2024-02-17 12:40:36 -05:00
Simon Cruanes
f6d67028cf
feat lwt: non-blocking TCP_client.with_connect 2024-02-17 12:40:35 -05:00
Simon Cruanes
930e09e5b3
lwt: basic IO wrappers, simple TCP server wrapper 2024-02-17 12:40:35 -05:00
Simon Cruanes
d248a569f6
feat: progress on moonpool-lwt 2024-02-17 12:40:35 -05:00
Simon Cruanes
90850ae38c
wip: moonpool lwt 2024-02-17 12:40:35 -05:00
Simon Cruanes
fbc7679d05
wip: add moonpool-lwt 2024-02-17 12:40:35 -05:00