Skip to content

#.find #273

@kochd

Description

@kochd

I got a expensive calculation and i want to kill all childs once one of them delivers a result:

results = Parallel.find(1..32, in_processes: 32) do
  this_could_take_long(1, 2)
end
p results #=> ["solution"]

Use case is solving a proof of work. One of the 16 processes will be the fastest and only one solution is needed. There seams to be no way to this or is ?

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