Skip to content

Releases: c-cube/moonpool

0.11

04 Feb 18:22
1136191

Choose a tag to compare

CHANGES:

  • feat: add Fut.for_iter

  • fix: in Lock, prevent flambda from reordering mutex-protected operations

  • document how many threads are used for work in Ws_pool

  • remove mentions of ocaml4 in readme

  • chore: for now, add bound for lwt 5.xx only

  • abstract type for Tracing_ stub (for new trace)

0.10

14 Nov 01:29
4de33f0

Choose a tag to compare

CHANGES:

  • breaking: remove around_task from schedulers

  • breaking: remove moonpool.fib entirely. Please use picos_std.structured
    if you really need structured concurrency.

  • remove deprecated moonpool-io and moonpool.sync

  • feat core: add Main, salvaged from moonpool.fib

  • block signals in background threads

  • refactor chan; fix bug in Chan.try_push

  • fix: make Moonpool_lwt.fut_of_lwt idempotent

0.9

29 Sep 13:21
0e5a289

Choose a tag to compare

0.9

CHANGES:

  • breaking: require OCaml 5

    • no further need for a preprocessor
    • forkjoin not longer optional
  • moonpool-lwt: large changes, including a Runner that runs
    inside Lwt_unix's event loop and can thus use any _ Lwt.t function

  • remove bounded_queue

  • fix core: better repropagating of errors

  • add Fut.{cancel,try_cancel}

  • perf: await on immediately ready timer queues its task

  • feat: add Moonpool.yield

  • deprecate moonpool.sync

  • deprecate moonpool_io

0.8

17 Apr 20:36
ed0eda2

Choose a tag to compare

0.8

CHANGES:

  • api(fut): make alias 'a Fut.t = 'a Picos.Computation.t public

  • feat: add Fut.make_promise, have 'a promise = private 'a fut

  • feat(exn_bt): in show/pp, do print the backtrace when present

  • feat: block signals in workers if asked to

  • relax bound on picos to 0.5-0.6

  • feat fib: spawn_ignore now has ?on optional param

  • change Moonpool.Chan so it's bounded (stil experimental)

  • fix task local storage: type was too specific

  • fix fiber: use a single fut/computation in fibers

0.7

10 Sep 12:56
0d8767f

Choose a tag to compare

0.7

CHANGES:

  • add Moonpool_fiber.spawn_top_ignore
  • add moonpool-io, based on picos_io (still very experimental)
  • move to picos as the foundation layer for concurrency primitives (#30)
  • move to thread-local-storage 0.2 with get/set API

0.6

02 Apr 17:39
0750e6a

Choose a tag to compare

0.6

CHANGES:

  • breaking: remove Immediate_runner (bug prone and didn't
    handle effects). Moonpool_fib.main can be used to handle
    effects in the main function.

  • remove deprecated alias Moonpool.Pool

  • feat: add structured concurrency sub-library moonpool.fib with
    fibers. Fibers can use await and spawn other fibers that will
    be appropriately cancelled when their parent is.

  • feat: add add moonpool-lwt as an experimental bridge between moonpool and lwt.
    This allows moonpool runners to be used from within Lwt to
    perform background computations, and conversely to call Lwt from
    moonpool with some precautions.

  • feat: task-local storage in the main moonpool runners, available from
    fibers and regular tasks.

  • feat: add Exn_bt to core

  • feat: add Runner.dummy

  • make moonpool.forkjoin optional (only on OCaml >= 5.0)

  • feat: add Fut.Advanced.barrier_on_abstract_container_of_futures

  • feat: add Fut.map_list

  • refactor: split off domain pool to moonpool.dpool

  • fix too early exit in Ws_pool

0.5.1

25 Nov 05:00
019cea2

Choose a tag to compare

CHANGES:

  • fix Ws_pool: workers would exit before processing
    all remaining tasks upon shutdown

0.5

08 Nov 17:44
fd2102c

Choose a tag to compare

0.5

CHANGES:

features

  • add Bb_queue.transfer

  • add Bb_queue.to_{iter,gen,seq}

  • add Fifo_pool, a simple pool with a single blocking queue for
    workloads with coarse granularity tasks that value
    latency (e.g. a web server)

  • add a work-stealing pool for heavy compute workloads that
    feature a lot of await/fork-join, with a lot of help
    from Vesa Karvonen (@polytypic)

  • add Fut.spawn_on_current_runner

  • add Runner.{spawn_on_current_runner, await}

  • add a few more toplevel aliases in Moonpool itself

  • add No_runner: a runner that runs tasks synchronously in the caller

  • on shutdown, pools will finish running all present tasks before
    closing. New tasks are immediately rejected.

  • use an optional dependency on thread-local-storage to
    implement work stealing and spawn_on_current_runner

optimizations

  • use the main domain to spawn threads on it. This means we can really
    use all cores, not all but one.
  • in Fork_join.both, only one of the two sides schedules a task,
    the other runs in the current thread. This reduces scheduling overhead.
  • compare to domainslib in benchmarks. With the WS pool we're now slightly
    ahead in terms of overhead on the recursive fib benchmark.

breaking

  • deprecate Pool, now an alias to Fifo_pool
  • the Fut.Infix_local and Fut.infix are gone, replaced with
    a simpler Fut.Infix module that tries to use the current runner
    for intermediate tasks.

0.4

29 Aug 18:28
43ca60f

Choose a tag to compare

0.4

CHANGES:

  • add Fut.{reify_error,bind_reify_error}

  • full lifecycle for worker domains, where a domain
    will shutdown if no thread runs on it, after a
    short delay.

  • fix: generalize type of create_arg

  • perf: in Bb_queue, only signal condition on push if queue was empty

0.3

17 Jul 03:38
8e9628a

Choose a tag to compare

0.3

CHANGES:

  • add Fork_join for parallelizing computations. This is only
    available on OCaml 5.x because it relies on effects.

  • add Fork_join.{for_,map_array,map_list}

  • add Fork_join.all_{list,init}

  • add Pool.with_

  • add a channel module

  • add Runner, change Pool to produce a Runner.t

  • add a Lock module

  • add support for domain-local-await when installed

  • add Fut.await for OCaml >= 5.0

  • fix: Fork_join.both_ignore now has a more general type

  • expose Suspend_ and its internal effect with an unstability alert.
    This is intended for implementors of Runner only.

  • port cpp.ml from containers, replace previous codegen with it.
    This will provide better flexibility for supporting multiple versions
    of OCaml in the future.

  • add Pool.run_wait_block; rename Pool.run into Pool.run_async

  • fix: in blocking queue, pop works on a non empty closed queue