Skip to content

Feature enhancement: Adding Pool.broadcast() for sending some data to all child workers #185

Open

Description

@stainleebakhla

Hi,

It would be a useful feature if there could be a way to send some data to all of the child workers in a pool. Something like Pool.broadcast() function would work. This could be really useful in scenarios when some initial data needs to be sent to a worker before starting any actual work.

Thanks

Activity

  1. josdejong commented on Oct 3, 2020

    @josdejong
    Owner

    Thanks for your suggestion Stainlee.

    I think your idea is similar to what is discussed in #65. If so let's please continue the discussion there.

  2. frankie-zeng commented on Jul 5, 2023

    @frankie-zeng

    is there a plan to use worker_thread broadcastchannel, which make all worker recevie a broadcast message and do some actions.

  3. josdejong commented on Jul 5, 2023

    @josdejong
    Owner

    I'm open to pull requests implementing this (see also #65).

  4. pelletier197 commented on Jan 21, 2026

    @pelletier197

    I know this is old, but is there any plan to merge this pull request ? That would be useful I agree 😄 Although I do think the broadcast would be useful in other scenarios, not be only for initialization.

    In my case, I use SQLite workers, and I'd need to send something to all workers periodically to update the connections. That's very specific, but I don't see why it should be limited to startup of workers only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions