Skip to content

Suggestion: Make Whirly.start { # block } return the result of the block #9

Description

@aisrael

Hi! Big fan of whirly, use it in almost all my scripts with long-running processes.

I frequently find myself going something like:

def foo
  Whirly.start
  result = do_foo
  Whirly
  result
end

Only because when Whirly.start is called with a block, it returns true.

I think that with a few code changes in whirly.rb#L168, we can make it return the result of the given block, allowing for:

def foo
  Whirly.start do
    do_foo
  end
end

I'd be happy to submit a PR if this suggestion is accepted.

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