kopia lustrzana https://github.com/micropython/micropython
tests/thread: Make stack-size test run correctly and reliable on uPy.
rodzic
94238d4ae5
commit
5b7789d519
|
@ -6,7 +6,7 @@ import sys
|
|||
import _thread
|
||||
|
||||
# different implementations have different minimum sizes
|
||||
if sys.implementation == 'micropython':
|
||||
if sys.implementation.name == 'micropython':
|
||||
sz = 2 * 1024
|
||||
else:
|
||||
sz = 32 * 1024
|
||||
|
@ -20,6 +20,9 @@ def thread_entry():
|
|||
global n_finished
|
||||
n_finished += 1
|
||||
|
||||
# reset stack size to default
|
||||
_thread.stack_size()
|
||||
|
||||
# test set/get of stack size
|
||||
print(_thread.stack_size())
|
||||
print(_thread.stack_size(sz))
|
||||
|
|
Ładowanie…
Reference in New Issue