Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 23 months ago

Closed 22 months ago

Last modified 22 months ago

#10837 closed Bug Report - General (fixed)

Script using System class of python bindings python process runs at 100% CPU while performing task

Reported by: djo <david.osguthorpe@…> Owned by: wagnerrp
Priority: minor Milestone: 0.25.2
Component: Bindings - Python Version: 0.25-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The calling python process runs at 100% while performing a task via the System class
Script is based on transcode_stub.py

Issue appears to be in the _PollingThread subclass of DequeBuffer? in the run function
The timeout in the poll call of the for loop is given as 0.1 (0.25-fixes update) but this poll function parameter is in milliseconds (python 2.7 online documentation). Probably 0.1 seconds was meant, ie 100 milliseconds
Changing the line

for fd,event in poller.poll(0.1):

to

for fd,event in poller.poll(100.0):

fixes problem

Attachments (0)

Change History (3)

comment:1 Changed 22 months ago by Raymond Wagner <rwagner@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 76433930fed60342a4b2929c6ff94a8413673e5b/mythtv:

Changes seconds to milliseconds in poller loop.

This corrects the timeout duration in the poller loop used to read data
from external programs. Code was written assuming timeouts in floating
point seconds, while poll() API takes milliseconds. Ahh.. consistency..

Fixes #10837

comment:2 Changed 22 months ago by Raymond Wagner <rwagner@…>

In 6aa7fbe106dbf88c2c067a0184a52d814cef1978/mythtv:

Changes seconds to milliseconds in poller loop.

This corrects the timeout duration in the poller loop used to read data
from external programs. Code was written assuming timeouts in floating
point seconds, while poll() API takes milliseconds. Ahh.. consistency..

Fixes #10837
(cherry picked from commit 76433930fed60342a4b2929c6ff94a8413673e5b)

comment:3 Changed 22 months ago by wagnerrp

  • Milestone changed from unknown to 0.25.2

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.