Skip to content

Commit f22b097

Browse files
committed
Make task priority configurable
Add config option 'CONFIG_ASYNC_TCP_TASK_PRIORITY', which defines what the tasks' priority is (defaults to 3). Based on me-no-dev/AsyncTCP#98
1 parent 0714013 commit f22b097

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/AsyncTCP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static bool _start_asyncsock_task(void)
6565
"asyncTcpSock",
6666
CONFIG_ASYNC_TCP_STACK,
6767
NULL,
68-
3, // <-- TODO: make priority a compile-time parameter
68+
CONFIG_ASYNC_TCP_TASK_PRIORITY,
6969
&_asyncsock_service_task_handle,
7070
CONFIG_ASYNC_TCP_RUNNING_CORE);
7171
if (!_asyncsock_service_task_handle) return false;

src/AsyncTCP.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ extern "C" {
4747
#ifndef CONFIG_ASYNC_TCP_STACK
4848
#define CONFIG_ASYNC_TCP_STACK 16384 // 8192 * 2
4949
#endif
50+
#ifndef CONFIG_ASYNC_TCP_TASK_PRIORITY
51+
#define CONFIG_ASYNC_TCP_TASK_PRIORITY 3
52+
#endif
5053

5154
class AsyncClient;
5255

0 commit comments

Comments
 (0)