Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some more threading errors #911

Merged

Conversation

m-seker
Copy link
Contributor

@m-seker m-seker commented Jul 26, 2020

Summary

As the title says.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of web configuration, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing setups:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's body (e.g. Fixes: #xxx[,#xxx], where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated (docs/docs/en)
  • Related tests have been updated

PLEASE DON'T FORGET TO ADD YOUR CHANGES TO CHANGELOG.MD

  • Yes, CHANGELOG.md is also updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

@hyperion-project
Copy link

Hello @m-seker 👋

I'm your friendly neighborhood bot and would like to say thank you for
submitting a pull request to Hyperion!

So that you and other users can test your changes more quickly,
you can find your workflow artifacts here.

If you make changes to your PR, i create a new link to your workflow artifacts.

Best regards,
Hyperion-Project

@@ -548,6 +540,4 @@ private slots:

/// Boblight instance
BoblightServer* _boblightServer;

QMutex _changes;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the cpp for why I removed

@@ -190,8 +191,6 @@ void Hyperion::handleSettingsUpdate(const settings::type& type, const QJsonDocum
}
else if(type == settings::LEDS)
{
QMutexLocker lock(&_changes);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the functions protected by this mutex (handleSettingsUpdate and update) is called from Hyperion's own thread. No need to synchronize.

@m-seker m-seker requested review from Lord-Grey, brindosch, Paulchen-Panther and tpmodding and removed request for Lord-Grey and brindosch July 26, 2020 21:35
@Paulchen-Panther Paulchen-Panther merged commit 8824e69 into hyperion-project:master Aug 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants