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
598470ee
Commit
598470ee
authored
4 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
this is no universal wheel
parent
c7e846a9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
satella/coding/concurrent/thread.py
+6
-2
6 additions, 2 deletions
satella/coding/concurrent/thread.py
setup.cfg
+1
-1
1 addition, 1 deletion
setup.cfg
with
7 additions
and
3 deletions
satella/coding/concurrent/thread.py
+
6
−
2
View file @
598470ee
...
...
@@ -357,7 +357,8 @@ class TerminableThread(threading.Thread):
return
False
def
safe_wait_condition
(
self
,
condition
:
Condition
,
timeout
:
tp
.
Union
[
str
,
float
],
wake_up_each
:
tp
.
Union
[
str
,
float
]
=
2
)
->
None
:
wake_up_each
:
tp
.
Union
[
str
,
float
]
=
2
,
dont_raise
:
bool
=
False
)
->
None
:
"""
Wait for a condition, checking periodically if the thread is being terminated.
...
...
@@ -367,6 +368,8 @@ class TerminableThread(threading.Thread):
:param timeout: maximum time to wait in seconds. Can be also a time string
:param wake_up_each: amount of seconds to wake up each to check for termination.
Can be also a time string.
:param dont_raise: if set to True, :class:`~satella.exceptions.WouldWaitMore` will not be
raised
:raises WouldWaitMore: timeout has passed and Condition has not happened
:raises SystemExit: thread is terminating
"""
...
...
@@ -385,7 +388,8 @@ class TerminableThread(threading.Thread):
return
except
WouldWaitMore
:
pass
raise
WouldWaitMore
()
if
not
dont_raise
:
raise
WouldWaitMore
()
def
safe_sleep
(
self
,
interval
:
float
,
wake_up_each
:
float
=
2
)
->
None
:
"""
...
...
This diff is collapsed.
Click to expand it.
setup.cfg
+
1
−
1
View file @
598470ee
...
...
@@ -53,4 +53,4 @@ max-line-length = 100
max-line-length
= 100
[bdist_wheel]
universal
=
1
universal
=
0
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