Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2871 from dkliban/thread-safe-progress
Browse files Browse the repository at this point in the history
Adds docs about using ProgressBar with threads
  • Loading branch information
dkliban committed Dec 5, 2016
2 parents 7595b3e + ee3ec28 commit c724040
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/pulp/app/models/progress.py
Expand Up @@ -181,6 +181,11 @@ class ProgressBar(ProgressReport):
ProgressBar objects are associated with a Task and auto-discover and populate the task id when
saved.
When using threads to update a ProgressBar in parallel, it is recommended that all threads
share the same in-memory instance. Django does not synchronize in-memory model instances, so
multiple instances of a specific ProgressBar will diverge as they are written to from separate
threads.
"""

class Meta:
Expand Down

0 comments on commit c724040

Please sign in to comment.