Skip to content

Commit

Permalink
Make task priority configurable
Browse files Browse the repository at this point in the history
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
  • Loading branch information
avillacis committed Oct 28, 2021
1 parent 0714013 commit f22b097
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/AsyncTCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static bool _start_asyncsock_task(void)
"asyncTcpSock",
CONFIG_ASYNC_TCP_STACK,
NULL,
3, // <-- TODO: make priority a compile-time parameter
CONFIG_ASYNC_TCP_TASK_PRIORITY,
&_asyncsock_service_task_handle,
CONFIG_ASYNC_TCP_RUNNING_CORE);
if (!_asyncsock_service_task_handle) return false;
Expand Down
3 changes: 3 additions & 0 deletions src/AsyncTCP.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ extern "C" {
#ifndef CONFIG_ASYNC_TCP_STACK
#define CONFIG_ASYNC_TCP_STACK 16384 // 8192 * 2
#endif
#ifndef CONFIG_ASYNC_TCP_TASK_PRIORITY
#define CONFIG_ASYNC_TCP_TASK_PRIORITY 3
#endif

class AsyncClient;

Expand Down

0 comments on commit f22b097

Please sign in to comment.