Skip to content

Which functions should we expose, and what should they be called? #3

Open
@njsmith

Description

@njsmith

In my initial draft, I have 3 functions:

  • run_on_each: concurrent map, with results optionally directed to a SendChannel, no return value
  • amap: concurrent map, async with calling convention, with results provided as an async iterable
  • run_all: concurrent call-all-these-callables, with results provided at the end as a list

I'm not at all sure that these three are the right set to provide, or that we have the names right.

I guess there's a two-dimensional space of calling conventions:

  • Input handling: fn+iterable (map style) vs. iterable-of-fns (gather-style)
  • Output handling: discard vs. send-on-channel vs. async-with-returning-async-iterable vs. nursery.start-returning-async-iterable vs. big-list-at-end

So in principle there are 2*5 = 10 functions we could provide here... but that's way too many and too confusing, so we need to cut it down somehow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions