[INSTRM-603] actor statusLoop are not stopped correctly Created: 04/Feb/19  Updated: 20/Mar/19  Resolved: 19/Mar/19

Status: Done
Project: Instrument control development
Component/s: ics_enuActor
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: arnaud.lefur Assignee: arnaud.lefur
Resolution: Done Votes: 0
Labels: SM1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Story Points: 1
Sprint: 2019 C

 Description   

As for now, an infinite number of status loop can be created.

 

running = self.monitors[controller] > 0
if (not running) and period > 0:
    self.statusLoopCB(controller)

 

If the monitoring period is set to 0 and then set back to a value before the statusLoop is called, two loops stay alive.

One solution would be to cancel the job if the monitoring period is set to 0 
callID = reactor.callLater(5, f)callID.cancel()



 Comments   
Comment by arnaud.lefur [ 25/Feb/19 ]

Since in enuActor each device inherit from QThread, I don't need an external loop to handle status.

Just use QThread.handleTimeout().

Comment by arnaud.lefur [ 19/Mar/19 ]

merged in 500cbba

Generated at Sat Feb 10 16:26:44 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.