-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set the core where a task execute #164
Comments
Hi.
No. TaskScheduler is a cooperative library, so it run in one thread in whatever task the scheduler and task objects are being called from. In fact, if you do use multiple rtos tasks, you should compile with thread protection.
Having said that, you can influence which core the rtos tasks is running on.
For example and inspiration, please check the main sketch of the repo below.
https://github.com/arkhipenko/dnd/blob/master/esp32_dnd_rtos_mjpeg_multi/esp32_dnd_rtos_mjpeg_multi.ino
The method you'd want to look closely at is
creareCoreTasks()
Notice how the video streaming task and TaskScheduler task are created pinned to different cores.
Works like a charm.
Hope this helps.
Cheers,
Anatoli
Sent from my mobile implant.
Apologies for autocorrect.
…________________________________
From: sebarch ***@***.***>
Sent: Friday, April 21, 2023 8:35:50 PM
To: arkhipenko/TaskScheduler ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [arkhipenko/TaskScheduler] Set the core where a task execute (Issue #164)
Hi, it´s possible to set the core where a task is executed without using freertos? Thanks
—
Reply to this email directly, view it on GitHub<#164>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AACMMTLQFEZKT6G7PSVVRPLXCMRWNANCNFSM6AAAAAAXHOV73E>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Thanks for your quick replay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, it´s possible to set the core where a task is executed without using freertos? Thanks
The text was updated successfully, but these errors were encountered: