Skip to content

Provide option to render more than one spinner at the same time #17

@danieltdp

Description

@danieltdp

Suppose you get multiple long tasks at hand.
It should be nice to be able to start more than one spinner before finishing the last one

take this as an example:

 from halo import Hal
 
 a = start_task_a()
 a_spinner = Halo({'text': 'Do A', 'spinner': 'dots'})
 a_spinner.start()
 a_is_spinning = True
 
 b = start_task_b()
 b_spinner = Halo({'text': 'Do B', 'spinner': 'dots'})
 b_spinner.start()
 b_is_spinning = True
 
 while a_is_spinning or b_is_spinning:
     if a.is_finished():
         a_spinner.succeed()
         a_is_spinning = False
     if b.is_finished():
         b_spinner.succeed()
         b_is_spinning = False

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions