Bug 326172

Summary: releasechecker uses busy wait
Product: [Applications] muon Reporter: Harald Sitter <sitter>
Component: muonAssignee: Jonathan Thomas <echidnaman>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 2.0.65   
Target Milestone: ---   
Platform: unspecified   
OS: Other   
Latest Commit: Version Fixed In: 2.1.1

Description Harald Sitter 2013-10-17 23:43:06 UTC
inside releasechecker one can find

time.sleep(0.5)

surely there must be a better way than that and short of that I'll suggest that the sleep be increased to something less resource consuming (5 seconds seems like a good enough thing).

Reproducible: Always
Comment 1 Harald Sitter 2013-11-04 14:58:31 UTC
Git commit d6181540fa9a76b01526af0f0eced81dc80d0d2c by Harald Sitter.
Committed on 04/11/2013 at 14:58.
Pushed by sitter into branch '2.1'.

Don't busy wait in releasechecker

.download() is a sync interface, so use that instead.

Also remove pointless debug.

FIXED-IN: 2.1.1

M  +1    -4    kded/distupgradeevent/releasechecker

http://commits.kde.org/muon/d6181540fa9a76b01526af0f0eced81dc80d0d2c
Comment 2 Harald Sitter 2013-11-05 16:07:33 UTC
Git commit ed6187b74b38d5b26c07e1a0a33a468dc00b573d by Harald Sitter.
Committed on 05/11/2013 at 16:07.
Pushed by sitter into branch '2.1'.

Reintroduce a busy-wait to releasechecker and document why!

Unfortunately due to incredibly crappy design of MetaReleaseCore we cannot
avoid the pointless context switches to check for .downloading. As
download() is started in a thread and we have no external control over
the thread, it is autostarted in __init__ and there are no synchronization
methods provided by MetaReleaseCore. Calling .download() manually which
would provide a nicely sync function will result in unprotected threading
leading to incorrect upgrade notifications again.

M  +13   -1    kded/distupgradeevent/releasechecker

http://commits.kde.org/muon/ed6187b74b38d5b26c07e1a0a33a468dc00b573d