Commit Graph

22 Commits

Author SHA1 Message Date
microDev
a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Diego Elio Pettenò
34b4993d63 Add license to some obvious files. 2020-07-06 19:16:25 +01:00
Diego Elio Pettenò
dd5d7c86d2 Fix up end of file and trailing whitespace.
This can be enforced by pre-commit, but correct it separately to make it easier to review.
2020-06-03 10:56:35 +01:00
Damien George
e374cfff80 py/modthread: Raise RuntimeError in release() if lock is not acquired. 2017-06-14 14:43:50 +10:00
Ville Skyttä
ca16c38210 various: Spelling fixes 2017-05-29 11:36:05 +03:00
Damien George
06a12ada48 tests/thread: Add stress-test for creating many threads. 2017-02-15 11:12:37 +11:00
Damien George
2847d7431d tests/thread: Replace busy waiting loops with a loop that sleeps.
Depending on the thread scheduler, a busy-wait loop can hog the CPU and
make the tests very slow.  So convert such loops to loops that have an
explicit sleep, allowing the worker threads to do their job.
2017-02-15 11:12:37 +11:00
Damien George
28185bb81b tests/thread: Fix stack size test so tests run reliably on baremetal. 2017-02-01 17:21:35 +11:00
Damien George
bebb3a6160 tests/thread: Make thread_exc2 runable on baremetal. 2017-01-31 13:59:20 +11:00
Rami Ali
f397e1fdf0 tests/thread: Improve modthread.c test coverage. 2016-12-29 13:27:50 +11:00
Damien George
8b9ddf4031 tests/thread: Allow some tests to run on ports with not much heap. 2016-06-28 11:28:52 +01:00
Damien George
63d05228a3 tests/thread: Allow thread_sleep1 to run without floating point. 2016-06-28 11:28:52 +01:00
Damien George
15e68277c1 tests/thread: Make sure that thread tests don't rely on floating point. 2016-06-28 11:28:52 +01:00
Damien George
5b7789d519 tests/thread: Make stack-size test run correctly and reliable on uPy. 2016-06-28 11:28:52 +01:00
Damien George
b7274e91bc tests/thread: Add test for concurrent mutating of user instance. 2016-06-28 11:28:50 +01:00
Damien George
2e4cdae4fd tests/thread: Add test for concurrent interning of strings.
Qstr code accesses global state and needs to be made thread safe.
2016-06-28 11:28:50 +01:00
Damien George
094a0dd11a tests/thread: Add tests that mutate shared objects.
Tests concurrent mutating access to: list, dict, set, bytearray.
2016-06-28 11:28:50 +01:00
Damien George
c73cf9d931 tests/thread: Rename thread_stress_XXX.py to stress_XXX.py. 2016-06-28 11:28:50 +01:00
Damien George
dcc7c5bd89 tests/thread: Add tests for running GC within a thread, and heap stress. 2016-06-28 11:28:49 +01:00
Damien George
3545ef8bb4 tests/thread: Remove need to sleep to wait for completion in some tests.
Use a lock and a counter instead, and busy wait for all threads to
complete.  This makes test run faster and they no longer rely on the time
module.
2016-06-28 11:09:31 +01:00
Damien George
2d5ea38b49 tests: Add 3 more tests for _thread module. 2016-06-28 11:09:31 +01:00
Damien George
ed36632c6c tests: Add tests for _thread module.
Includes functionality and stress tests.
2016-06-28 11:09:31 +01:00