Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
satella
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public
satella
Commits
5ffd7e40
Commit
5ffd7e40
authored
5 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
docs fix
parent
d3111888
No related branches found
Branches containing commit
Tags
v2.4.16
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/coding/concurrent.rst
+1
-1
1 addition, 1 deletion
docs/coding/concurrent.rst
satella/coding/concurrent/thread.py
+2
-2
2 additions, 2 deletions
satella/coding/concurrent/thread.py
with
3 additions
and
3 deletions
docs/coding/concurrent.rst
+
1
−
1
View file @
5ffd7e40
...
...
@@ -17,7 +17,7 @@ LockedDataset
TerminableThread
================
Note that
_
force=True
_
is not available on PyPy. If an attempt to use it on PyPy is made,
Note that
**
force=True
**
is not available on PyPy. If an attempt to use it on PyPy is made,
``RuntimeError`` will be thrown.
Please note that in order to terminate, target Python thread must at least execute some Python code.
...
...
This diff is collapsed.
Click to expand it.
satella/coding/concurrent/thread.py
+
2
−
2
View file @
5ffd7e40
...
...
@@ -17,9 +17,9 @@ class TerminableThread(threading.Thread):
>>>
a
.
start
()
>>>
a
.
terminate
().
join
()
Flag whether to terminate is stored in self._terminating.
Flag whether to terminate is stored in
**
self._terminating
**
.
If you decide to override run(), you got to check periodically for self._terminating to become true.
If you decide to override run(), you got to check periodically for
**
self._terminating
**
to become true.
If you decide to use the loop/cleanup interface, you don
'
t need to do so.
You may also use it as a context manager. Entering the context will start the thread, and exiting
...
...
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