Bug 326172 - releasechecker uses busy wait
Summary: releasechecker uses busy wait
Status: RESOLVED FIXED
Alias: None
Product: muon
Classification: Applications
Component: muon (show other bugs)
Version: 2.0.65
Platform: unspecified Other
: NOR normal
Target Milestone: ---
Assignee: Jonathan Thomas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-17 23:43 UTC by Harald Sitter
Modified: 2013-11-05 16:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.1.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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