micropython/tests/thread
David Lechner ffb43b2dd3 py/modthread: Return thread id from start_new_thread().
In CPython, `_thread.start_new_thread()` returns an ID that is the same ID
that is returned by `_thread.get_ident()`.  The current MicroPython
implementation of `_thread.start_new_thread()` always returns `None`.

This modifies the required functions to return a value. The native thread
id is returned since this can be used for interop with other functions, for
example, `pthread_kill()` on *nix. `_thread.get_ident()` is also modified
to return the native thread id so that the values match and avoids the need
for a separate `native_id` attribute.

Fixes issue #12153.

Signed-off-by: David Lechner <david@pybricks.com>
2023-09-03 18:49:18 +10:00
..
mutate_bytearray.py
mutate_dict.py
mutate_instance.py
mutate_list.py
mutate_set.py
stress_aes.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
stress_create.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
stress_heap.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
stress_recurse.py
stress_schedule.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
stress_schedule.py.exp
thread_exc1.py
thread_exc2.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
thread_exc2.py.exp
thread_exit1.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
thread_exit2.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
thread_gc1.py
thread_heap_lock.py
thread_heap_lock.py.exp
thread_ident1.py py/modthread: Return thread id from start_new_thread(). 2023-09-03 18:49:18 +10:00
thread_lock1.py
thread_lock2.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
thread_lock3.py
thread_lock4.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
thread_lock5.py
thread_qstr1.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
thread_shared1.py
thread_shared2.py
thread_sleep1.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
thread_stacksize1.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
thread_start1.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
thread_start2.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00