Skip to content

Removes observers when API thread terminates. - #255

Merged
mrpollo merged 1 commit into
patchfrom
tcr-74
Jul 29, 2015
Merged

mrpollo merged 1 commit into
patchfrom
tcr-74

Conversation

@tcr3dr

@tcr3dr tcr3dr commented Jul 29, 2015

Copy link
Copy Markdown
Contributor

See #74.

This adds a private method remove_all_observers() to Vehicle. Then we call

self.module.vehicle.remove_all_observers()
self.module.vehicle.unset_mavlink_callback()

When the API thread terminates. This can't be tested using the test bench, but experimentally it works and helps define a lifecycle for the Vehicle object.

@tcr3dr tcr3dr added this to the v1.4.2 milestone Jul 29, 2015
@mrpollo

mrpollo commented Jul 29, 2015

Copy link
Copy Markdown
Member

we should definitely find a way to test this, that said I think this is good enough for now.

lgtm

mrpollo added a commit that referenced this pull request Jul 29, 2015
Removes observers when API thread terminates.
@mrpollo
mrpollo merged commit 38a9451 into patch Jul 29, 2015
@mrpollo
mrpollo deleted the tcr-74 branch July 29, 2015 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants