Move mpos.apps.good_stack_size() to TaskManager.good_stack_size()

Trying to get every app-facing API as part of an object.
This commit is contained in:
Thomas Farstrike
2026-01-24 19:10:51 +01:00
parent 7b65ec7301
commit 43eb8220c8
9 changed files with 30 additions and 58 deletions
+3 -5
View File
@@ -2,12 +2,10 @@ import unittest
import _thread
import time
from mpos import App, PackageManager
import mpos.apps
from mpos import App, PackageManager, TaskManager
from websocket import WebSocketApp
# demo_multiple_ws.py
import asyncio
import aiohttp
@@ -137,7 +135,7 @@ class TestTwoWebsockets(unittest.TestCase):
asyncio.run(self.main())
def test_it(self):
_thread.stack_size(mpos.apps.good_stack_size())
_thread.stack_size(TaskManager.good_stack_size())
_thread.start_new_thread(self.newthread, ())
time.sleep(10)
@@ -253,6 +251,6 @@ class TestCrashingSeparateThreads(): # Disabled
def test_it(self):
for url in self.WS_URLS:
_thread.stack_size(mpos.apps.good_stack_size())
_thread.stack_size(TaskManager.good_stack_size())
_thread.start_new_thread(self.newthread, (url,))
time.sleep(15)
+2 -2
View File
@@ -3,7 +3,7 @@ import _thread
import time
from mpos import App, PackageManager
import mpos.apps
from mpos import TaskManager
from websocket import WebSocketApp
@@ -136,7 +136,7 @@ class TestTwoWebsockets(unittest.TestCase):
asyncio.run(self.main())
def test_it(self):
_thread.stack_size(mpos.apps.good_stack_size())
_thread.stack_size(TaskManager.good_stack_size())
_thread.start_new_thread(self.newthread, ())
time.sleep(10)