Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
HowToBound
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Karabo
HowToBound
Commits
7b39600e
Commit
7b39600e
authored
5 years ago
by
Sergey Esenov
Browse files
Options
Downloads
Patches
Plain Diff
Use 'preDestruction' method for stopping threads
parent
5cacc942
No related branches found
No related tags found
1 merge request
!6
Periodic tasks in python bound
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/intro.rst
+4
-5
4 additions, 5 deletions
source/intro.rst
with
4 additions
and
5 deletions
source/intro.rst
+
4
−
5
View file @
7b39600e
...
...
@@ -412,15 +412,14 @@ slot of ``start`` button or another function that should activate
the periodic task.
Attention! If this device is killed the ``slotKillDevice`` is called,
so it is important to re-implement ``slotKillDevice`` method in ``Klass``
class to stop running our polling loop above
which calls ``preDestruction`` method in turn. so it is important to
re-implement ``preDestruction`` method in ``Klass`` class to stop
running our polling loop above
.. code-block:: python
def
slotKillDevice
(self):
def
preDestruction
(self):
self.running = False # stop the loop
# call parent version of slotKillDevice method
super(Klass, self).slotKillDevice()
Please follow this pattern to allow ``karabo-stop`` of python server
working properly. Otherwise the device and server may hang up!
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment