Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • Shortwave Shortwave
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 59
    • Issues 59
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • World
  • ShortwaveShortwave
  • Merge requests
  • !392

WIP: Gcast controller refactoring

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Lorenzo Miglietta requested to merge ranfdev/Shortwave:gcast_controller_refactoring into master Jun 15, 2020
  • Overview 3
  • Commits 1
  • Pipelines 6
  • Changes 2

So...

Most of the GCastController data was only used by the new thread you were creating. So instead of using a bunch of Arcs and Mutexes, I've moved all the data used by the thread inside the GCastControllerBackend struct.

Then I splitted the big match in multiple methods of GCastControllerBackend.


Everything should work pretty much the same as before.

This is the only effective change I'm aware of:

send!(self.app_sender, Action::PlaybackStop);

This is not inside an if statement anymore, so it will be executed even when self.device_ip is empty. But I think it's not a big deal.

There is a recursive cycle in the heart_beat method... I've already solved it, but I want to clean the code a bit more before pushing

Edited Apr 14, 2022 by Lorenzo Miglietta
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: gcast_controller_refactoring