Skip to content

Commit

Permalink
Allow setting stack size via user defines
Browse files Browse the repository at this point in the history
Based on me-no-dev/AsyncTCP#89 . This is a
trivial change and potentially useful.
  • Loading branch information
avillacis committed Oct 28, 2021
1 parent 9a6ab11 commit 0714013
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 @@ -63,7 +63,7 @@ static bool _start_asyncsock_task(void)
xTaskCreateUniversal(
_asynctcpsock_task,
"asyncTcpSock",
8192 * 2,
CONFIG_ASYNC_TCP_STACK,
NULL,
3, // <-- TODO: make priority a compile-time parameter
&_asyncsock_service_task_handle,
Expand Down
3 changes: 3 additions & 0 deletions src/AsyncTCP.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ extern "C" {
#define CONFIG_ASYNC_TCP_RUNNING_CORE -1 //any available core
#define CONFIG_ASYNC_TCP_USE_WDT 1 //if enabled, adds between 33us and 200us per event
#endif
#ifndef CONFIG_ASYNC_TCP_STACK
#define CONFIG_ASYNC_TCP_STACK 16384 // 8192 * 2
#endif

class AsyncClient;

Expand Down

0 comments on commit 0714013

Please sign in to comment.