D29008: Use the mount Pier Side property to manage Pier Flip

Eric Dejouhanet noreply at phabricator.kde.org
Fri Apr 24 13:06:02 BST 2020


TallFurryMan added a comment.


  One small answer on the concurrent use of m_Status. Just for theory.

INLINE COMMENTS

> chrisrowland wrote in mount.cpp:653-654
> the isTracking line needs moving down to where it's used.
> 
> The code turning tracking off is copied from the previous altitude limits code above.
> The code from isTracking downwards is almost unchanged from what was there before, I've set the flipDelayHours to 0 and added some debug messages.
> So I don't think it's any more broken than it was before, I'd like to leve it for now.

SetTrackEnabled at 636, added by you, produces a asynchronous change on the mount status. You are then checking if the status changed at 651 using a volatile m_Status. Therefore, the result of your test is undefined. If you want to make it deterministic, you need to copy the value of m_Status before any action from your side that would change it.

Now, the update of m_Status is handled by a signal connection, so there may be a good chance that the current function will be executed before the update function is. There's also statistically a good chance that the mount interaction takes longer that this function code. But it all depends on the Qt thread model, and how dbus events are really managed.

REPOSITORY
  R321 KStars

BRANCH
  UsePierSideForFlip (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D29008

To: chrisrowland, mutlaqja, TallFurryMan, wreissenberger
Cc: apol, TallFurryMan, wreissenberger, kde-edu, narvaez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20200424/79be50af/attachment.html>


More information about the kde-edu mailing list