| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import sys | ||
| import unittest | ||
| import threading | ||
|
|
||
| from test.support import threading_helper | ||
|
|
||
| NTHREADS = 6 | ||
|
|
||
| @threading_helper.requires_working_threading() | ||
| class TestFrame(unittest.TestCase): | ||
| def test_frame_clear_simultaneous(self): | ||
|
|
||
| def getframe(): | ||
| return sys._getframe() | ||
|
|
||
| foo = getframe() | ||
| def work(): | ||
| for _ in range(4000): | ||
| foo.clear() | ||
|
|
||
|
|
||
| threads = [] | ||
| for i in range(NTHREADS): | ||
| thread = threading.Thread(target=work) | ||
| thread.start() | ||
| threads.append(thread) | ||
|
|
||
| for thread in threads: | ||
| thread.join() | ||
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.