Skip to content

Commit 9c4145b

Browse files
committed
Make task priority configurable
[pull request 98](me-no-dev#98)
1 parent a6d3812 commit 9c4145b

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
@@ -218,7 +218,7 @@ static bool _start_async_task(){
218218
return false;
219219
}
220220
if(!_async_service_task_handle){
221-
xTaskCreateUniversal(_async_service_task, "async_tcp", CONFIG_ASYNC_TCP_STACK, NULL, 3, &_async_service_task_handle, CONFIG_ASYNC_TCP_RUNNING_CORE);
221+
xTaskCreateUniversal(_async_service_task, "async_tcp", CONFIG_ASYNC_TCP_STACK, NULL, CONFIG_ASYNC_TCP_TASK_PRIORITY, &_async_service_task_handle, CONFIG_ASYNC_TCP_RUNNING_CORE);
222222
if(!_async_service_task_handle){
223223
return false;
224224
}

src/AsyncTCP.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ extern "C" {
3838
#ifndef CONFIG_ASYNC_TCP_STACK
3939
#define CONFIG_ASYNC_TCP_STACK 8192 * 2
4040
#endif
41+
#ifndef CONFIG_ASYNC_TCP_TASK_PRIORITY
42+
#define CONFIG_ASYNC_TCP_TASK_PRIORITY 3
43+
#endif
4144
#ifndef CONFIG_ASYNC_TCP_QUEUE_SIZE
4245
#define CONFIG_ASYNC_TCP_QUEUE_SIZE 32
4346
#endif

0 commit comments

Comments
 (0)