Simon Cruanes
ef7d370060
more tracing for Fut
2024-01-30 16:25:31 -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
469cb89ecd
feat: add Fut.Advanced.barrier_on_abstract_container_of_futures
...
this is a good building block for waiting on multiple futures.
2023-12-22 13:14:05 -05:00
Simon Cruanes
1c94c59d88
feat: add Fut.map_list
2023-11-17 12:41:29 -05:00
Simon Cruanes
59ae1068fd
breaking: fut: only have module Infix
...
we keep `Infix_local` as a deprecated alias to it for now
2023-11-08 12:02:13 -05:00
Simon Cruanes
d4e5e811bb
breaking: fut: change behavior of ?on
...
combinators that take `?on` will now check if they can use the current
runner if `?on:None` is passed. If no runner is passed and they're run
from outside a runner, they will just run in the relevant callback or on
the current thread.
2023-11-08 12:02:13 -05:00
Simon Cruanes
9709f88d5f
breaking: fut: join does not take ?on anymore
2023-11-08 12:02:13 -05:00
Simon Cruanes
9cb7781a2e
feat: fut: add spawn_on_current_runner
2023-11-08 12:02:13 -05:00
Simon Cruanes
68fe7221b8
suspend: remove additional parameter, always run tasks in handler
2023-10-27 14:47:54 -04:00
Simon Cruanes
3e614ec992
rename Pool to Ws_pool; deprecated Moonpool.Pool
2023-10-25 23:43:18 -04:00
Simon Cruanes
aa0dea3e34
add Fut.{reify_error,bind_reify_error}
2023-07-26 16:22:42 -04:00
Simon Cruanes
6c73afbe5b
perf: optimize Fut.for_ a bit
...
remove intermediate array.
2023-07-10 11:00:34 -04:00
Simon Cruanes
b07d460b3f
port cpp.ml from containers, replace previous codegen with it
...
now OCaml 5-only features are truly available only on OCaml 5, instead
of just relying on the user reading the docstring.
2023-07-09 19:49:24 -04:00
Simon Cruanes
45838d9607
fix: in fork-join, start sub-tasks within a handler
2023-07-05 21:55:00 -04:00
Simon Cruanes
e4b159c695
fut: fix warnings
2023-06-24 15:05:56 -04:00
Simon Cruanes
1d23d2d7a1
rename Fut.await_exn to Fut.await
2023-06-20 22:43:33 -04:00
Simon Cruanes
4fd6154b56
refactor suspend
...
do not wrap each step in a new handler; using Effects.Deep we only wrap
the entrypoint of the task, and subsequent `continue` get scheduled
as-is.
2023-06-20 22:43:15 -04:00
Simon Cruanes
e26029ab90
feat: add Fut.await and Fut.await_exn for OCaml >= 5.0
...
this uses suspension (based on `Suspend_`) to wait for completion of the
future.
2023-06-20 22:43:13 -04:00
Simon Cruanes
b8588f2d65
feat: add Fut.for_list
2023-06-15 11:59:10 -04:00
Simon Cruanes
d74c6da3fa
fix(fut): fix bug when calling wait_list []
2023-06-15 11:58:55 -04:00
Simon Cruanes
d60bf3828b
fix: join_array on arrays of length=1 had a bound error
2023-06-15 11:42:13 -04:00
Simon Cruanes
f76b713556
add Fut.is_done
2023-06-15 10:24:20 -04:00
Simon Cruanes
debdc8fc31
add Fut.for_array to easily iterate on an array in parallel
2023-06-14 11:38:01 -04:00
Simon Cruanes
dd5a177a5f
add Fut.get_or_fail{,_exn}
2023-06-14 11:33:24 -04:00
Simon Cruanes
d766b362f1
feat fut: add infix, builds a INFIX as a 1st class module
2023-06-12 22:06:48 -04:00
Simon Cruanes
7c853861d8
feat fut: add join
2023-06-12 22:06:43 -04:00
Simon Cruanes
0177d6aee7
fix fut: actually run all map/bind callbacks if pool is provided
2023-06-12 22:06:18 -04:00
Simon Cruanes
5e9470b750
comment
2023-06-11 00:06:50 -04:00
Simon Cruanes
d2521472c0
refactor: rename little blocking queue
2023-06-08 14:22:35 -04:00
Simon Cruanes
259fee2722
perf fut: use Domain_.relax in spin loops
2023-06-08 00:07:54 -04:00
Simon Cruanes
bd1ada40d4
Fut: add Infix_local
2023-06-06 23:34:06 -04:00
Simon Cruanes
d87dff529d
split into multiple files
2023-06-01 22:04:06 -04:00