Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Multi thread functions show only one bar #176

Copy link
Copy link

Description

@AndrewLauu
Issue body actions

Description

I am now trying to build a multi-thread downloader with progressbar. When I try to get following result:

thread-1: |###### | ETA: 5s
thread-2: |#### | ETA: 7s
thread-3: |######## | ETA: 3s

While I only got one bar with changing prefixs(thread-1,thread-3...) and changing bar in console.

Having searched a lot but didn't find solution, so hope to get your help.

Simplified codes are as followed:

Code

def download():
    respone=requests.get(url,stream=True)
    for file in progressbar.progressbar(rsponse.iter_content(...)):
        with  open(dir,'w') as f:
            f.write(file)

for i in range(3):
    t=threading.Thread(target=download,...)
    t.start
for i in range(3):
    t.join()

Versions

  • Python version: 3.7
  • Python distribution/environment: PyCharm
  • Operating System: Windows 8.1
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.