Click here to Skip to main content
15,867,686 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
honey the codewitch2-Mar-21 14:26
mvahoney the codewitch2-Mar-21 14:26 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Member 133016792-Mar-21 19:59
Member 133016792-Mar-21 19:59 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
honey the codewitch3-Mar-21 0:41
mvahoney the codewitch3-Mar-21 0:41 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Member 133016793-Mar-21 0:46
Member 133016793-Mar-21 0:46 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Greg Utas27-Feb-21 13:43
professionalGreg Utas27-Feb-21 13:43 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
markrlondon27-Feb-21 13:56
markrlondon27-Feb-21 13:56 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Espen Harlinn27-Feb-21 14:57
professionalEspen Harlinn27-Feb-21 14:57 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
honey the codewitch27-Feb-21 15:16
mvahoney the codewitch27-Feb-21 15:16 
I don't know if it's any kind of true or at least standardized SMP which is why I put it in quotes, but as long as it's compiled with it there are options like xTaskCreatePinnedToCore(). That said, I don't see them in that documentation. It appears that the documentation there might be out of date.

I can't profile it to determine what cores are really being utilized because while there are options where you can compile in profiling features like that, they are disabled for the ESP-IDF build, which is what I'm currently using, given my ESP_WROVER_KIT is sort of dependent on ESP-IDF, and I don't have say, an ARM based monster with JTAG debugging in the alternative. I'm left sort of having to trust the little OS more than I'd like.

That was one of the reasons I was hoping I'd get better results with this sample.

I *do* think it's using both cores based on my ability to create an idle priority thread on the second core and get spew back from it even when i spin a loop on the main core (causing the main core's idle thread to be starved), but I don't know how well it schedules, and I almost doubt it knows well enough to round robin threads across all cores. I'm not even sure offhand how to get the core count, and if I try to do the creation call pinned to a core that doesn't exist it crashes. Unsure | :~

I *am* getting true concurrency from the looks of it. It's just badly scheduled concurrency. We'll see how it bakes out when I start doing I/O heavy stuff with it, because that's really where you'd want to use this library anyway.

I'm about to release a new article that builds on the stuff i recently wrote, only (hopefully) not specific to the ESP32 this time, and has more stuff like threads and thread pooling added to it.
Real programmers use butterflies

GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Espen Harlinn27-Feb-21 15:28
professionalEspen Harlinn27-Feb-21 15:28 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
honey the codewitch27-Feb-21 20:01
mvahoney the codewitch27-Feb-21 20:01 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Espen Harlinn28-Feb-21 5:39
professionalEspen Harlinn28-Feb-21 5:39 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
markkuk27-Feb-21 22:18
markkuk27-Feb-21 22:18 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
honey the codewitch28-Feb-21 2:00
mvahoney the codewitch28-Feb-21 2:00 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Daniel Pfeffer27-Feb-21 22:17
professionalDaniel Pfeffer27-Feb-21 22:17 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
honey the codewitch28-Feb-21 1:59
mvahoney the codewitch28-Feb-21 1:59 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Daniel Pfeffer28-Feb-21 3:20
professionalDaniel Pfeffer28-Feb-21 3:20 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
honey the codewitch28-Feb-21 3:22
mvahoney the codewitch28-Feb-21 3:22 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Sander Rossel27-Feb-21 23:13
professionalSander Rossel27-Feb-21 23:13 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Martijn Smitshoek28-Feb-21 22:39
Martijn Smitshoek28-Feb-21 22:39 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
CARNESECCHILuc28-Feb-21 23:42
CARNESECCHILuc28-Feb-21 23:42 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
honey the codewitch1-Mar-21 3:10
mvahoney the codewitch1-Mar-21 3:10 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
obermd1-Mar-21 3:16
obermd1-Mar-21 3:16 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
milo-xml1-Mar-21 4:41
professionalmilo-xml1-Mar-21 4:41 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
honey the codewitch1-Mar-21 4:46
mvahoney the codewitch1-Mar-21 4:46 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
milo-xml2-Mar-21 3:33
professionalmilo-xml2-Mar-21 3:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.