Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
4e35a0e4
Commit
4e35a0e4
authored
Jun 08, 1999
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated to use random rather than rand.
parent
7f2c4a94
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
lib/Components/ExtensionClass/test/test_Sync.py
lib/Components/ExtensionClass/test/test_Sync.py
+2
-2
lib/Components/ExtensionClass/test/test_ThreadLock.py
lib/Components/ExtensionClass/test/test_ThreadLock.py
+2
-2
No files found.
lib/Components/ExtensionClass/test/test_Sync.py
View file @
4e35a0e4
from
Sync
import
Synchronized
import
thread
from
rand
import
rand
from
rand
om
import
random
from
time
import
sleep
...
...
@@ -12,7 +12,7 @@ class P(Synchronized):
def
inc
(
self
):
c
=
self
.
count
sleep
(
rand
()
/
327680.0
)
sleep
(
rand
om
()
)
self
.
count
=
self
.
count
+
1
return
c
,
self
.
count
...
...
lib/Components/ExtensionClass/test/test_ThreadLock.py
View file @
4e35a0e4
import
ThreadLock
,
thread
from
rand
import
rand
from
rand
om
import
random
from
time
import
sleep
from
ExtensionClass
import
Base
...
...
@@ -30,7 +30,7 @@ class P(Base):
def
inc
(
self
):
c
=
self
.
count
sleep
(
rand
()
/
32768.0
)
sleep
(
rand
om
()
)
self
.
count
=
self
.
count
+
1
return
c
,
self
.
count
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment