Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Back-pressure aware operators #236

@Atry

Description

@Atry

Currently merge_all_threads can result in out-of-memory, when concurrent is not Infinity and the source submits items faster than the mapper handles items.

I wonder if we could change the type of concurrent from usize to a struct:

pub struct ConcurrentConfig<F, Item> {
  usize max_number_of_inner_observers;
  usize max_buffer_size;
  F backpressure_handler;
}

impl<F, Item> ConcurrentConfig<F, Item>
where
    F: FnMut(Item) -> () {
}

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