Skip to content

Commit 243ac9a

Browse files
threading: use good_stack_size
1 parent 1433066 commit 243ac9a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal_filesystem/lib/threading.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import _thread
22

3+
import mpos.apps
4+
35
class Thread:
46
def __init__(self, group=None, target=None, name=None, args=(), kwargs=None, daemon=None):
57
self.target = target
@@ -18,8 +20,8 @@ def start(self):
1820
#stacksize = 12*1024
1921
# small stack sizes 8KB gives segfault directly
2022
# 22KB or less is too tight on desktop, 23KB and more is fine
21-
stacksize = 24*1024
22-
#stacksize = mpos.apps.good_stack_size() # don't depend on mpos here
23+
#stacksize = 24*1024
24+
stacksize = mpos.apps.good_stack_size()
2325
#stacksize = 20*1024
2426
print(f"starting thread with stacksize {stacksize}")
2527
_thread.stack_size(stacksize)

0 commit comments

Comments
 (0)