summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_threaded_import.py
Commit message (Collapse)AuthorAgeFilesLines
* SF bug #516372: test_thread: unhandled exc. in threadTim Peters2002-02-161-2/+6
| | | | | | | | Fix exit races in test_thread.py and test_threaded_import.py. I suspect the bug is provokable only under Linux (where child threads seem to get lots of cycles before they get killed after the main thread exits), or on multi-processor machines running other OSes. Bugfix candidate.
* Add a new function imp.lock_held(), and use it to skip test_threaded_importTim Peters2001-08-301-4/+6
| | | | when that test is doomed to deadlock.
* Workaround by Tim Peters to skip this test if run from test.autotest,Jack Jansen2001-08-291-1/+5
| | | | | in which case it will hang because the import lock is already held by the main thread.
* Implementing an idea from Guido on the checkins list:Tim Peters2001-05-221-23/+17
| | | | | | | | When regrtest.py finds an attribute "test_main" in a test it imports, regrtest runs the test's test_main after the import. test_threaded_import needs this else the cross-thread import lock prevents it from making progress. Other tests can use this hack too, but I doubt it will ever be popular.
* New test adapted from the ancient Demo/threads/bug.py.Tim Peters2001-05-221-0/+52
ICK ALERT: read the long comment block before run_the_test(). It was almost impossible to get this to run without instant deadlock, and the solution here sucks on several counts. If you can dream up a better way, let me know!