You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -156,9 +156,9 @@ void setup() {
156
156
That's all there is to it! If you push this program to your (compatible) microcontroller, it will immediately start printing the following into your Serial console (once per second):
157
157
158
158
>MyFirstThread::OnLoop() - Thread 1 - On CPU 0, Counter = 0
159
-
MyFirstThread::OnLoop() - Thread 1 - On CPU 0, Counter = 1
160
-
MyFirstThread::OnLoop() - Thread 1 - On CPU 0, Counter = 2
161
-
MyFirstThread::OnLoop() - Thread 1 - On CPU 0, Counter = 3
159
+
>MyFirstThread::OnLoop() - Thread 1 - On CPU 0, Counter = 1
160
+
>MyFirstThread::OnLoop() - Thread 1 - On CPU 0, Counter = 2
161
+
>MyFirstThread::OnLoop() - Thread 1 - On CPU 0, Counter = 3
162
162
163
163
### What about the `loop()` method?
164
164
Your existing `loop()` method will continue to operate exactly as it always has. On the ESP32, the default `loop()` method executes on CPU 1, while you will notice that your instance of `MyFirstThread` (`thread1` in the above sample code) is running on CPU 0.
@@ -221,11 +221,11 @@ void setup() {
221
221
222
222
We've now added two additional threads, so our output will look something like this:
223
223
>MyFirstThread::OnLoop() - Thread 1 - On CPU 0, Counter = 1
224
-
MyFirstThread::OnLoop() - Thread 2 - On CPU 1, Counter = 1
225
-
MyFirstThread::OnLoop() - Thread 3 - On CPU 0, Counter = 1
224
+
>MyFirstThread::OnLoop() - Thread 2 - On CPU 1, Counter = 1
225
+
>MyFirstThread::OnLoop() - Thread 3 - On CPU 0, Counter = 1
226
226
>MyFirstThread::OnLoop() - Thread 1 - On CPU 0, Counter = 2
227
-
MyFirstThread::OnLoop() - Thread 3 - On CPU 0, Counter = 2
228
-
MyFirstThread::OnLoop() - Thread 2 - On CPU 1, Counter = 2
227
+
>MyFirstThread::OnLoop() - Thread 3 - On CPU 0, Counter = 2
228
+
>MyFirstThread::OnLoop() - Thread 2 - On CPU 1, Counter = 2
229
229
230
230
The explicit maximum number of *ESPresio*`Thread`s supported by the library is 256, however the *practical limit* depends entirely on the specifications of your microcontroller. It's almost certainly going to be considerably lower than 256!
0 commit comments