Re: problem in multithreaded yum display

James Antill <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
pranjal pandit <[email protected]> writes:

> Hello,
> We are in a process submit patch to make yum download several packages
> simulteneously, we have modified the code in yum tree 3_2_X and code
> is running all right except the display part.

 How do you do this? It sounds a bit like threading, you probably
don't want to do that.

>  The text meter displayed while downloading intermittently switches
> between two packages getting downloaded even when tried for different
> objects of urlgrab whereas  we want two independent text meters.

 Without going full bore curses there's no sane way to do multiline
updates, what you probably want to do is when you come out of poll()
and do the reads then choose the package which has the highest
percentage complete and use that for the display (although, obviously
the total percentage will still go up).
 Another one would be to display using the highest percentage
complete, from just the files that have read() something
"recently". But the benefits of this (don't see a single package
stopped at 99% for a while) might be outweighed by problems (too much
flickering between downloads, for the user).

-- 
James Antill -- [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.