Click here to Skip to main content
15,166,099 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 15:26
mvahoney the codewitch2-Mar-21 15:26 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Member 133016792-Mar-21 20:59
MemberMember 133016792-Mar-21 20:59 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
honey the codewitch3-Mar-21 1:41
mvahoney the codewitch3-Mar-21 1:41 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Member 133016793-Mar-21 1:46
MemberMember 133016793-Mar-21 1:46 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Greg Utas27-Feb-21 14:43
mveGreg Utas27-Feb-21 14:43 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
markrlondon27-Feb-21 14:56
Membermarkrlondon27-Feb-21 14:56 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Espen Harlinn27-Feb-21 15:57
professionalEspen Harlinn27-Feb-21 15:57 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
honey the codewitch27-Feb-21 16:16
mvahoney the codewitch27-Feb-21 16: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 16:28
professionalEspen Harlinn27-Feb-21 16:28 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
honey the codewitch27-Feb-21 21:01
mvahoney the codewitch27-Feb-21 21:01 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Espen Harlinn28-Feb-21 6:39
professionalEspen Harlinn28-Feb-21 6:39 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
markkuk27-Feb-21 23:18
Membermarkkuk27-Feb-21 23:18 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
honey the codewitch28-Feb-21 3:00
mvahoney the codewitch28-Feb-21 3:00 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Daniel Pfeffer27-Feb-21 23:17
professionalDaniel Pfeffer27-Feb-21 23:17 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
honey the codewitch28-Feb-21 2:59
mvahoney the codewitch28-Feb-21 2:59 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Daniel Pfeffer28-Feb-21 4:20
professionalDaniel Pfeffer28-Feb-21 4:20 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
honey the codewitch28-Feb-21 4:22
mvahoney the codewitch28-Feb-21 4:22 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Sander Rossel28-Feb-21 0:13
professionalSander Rossel28-Feb-21 0:13 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
Martijn Smitshoek28-Feb-21 23:39
MemberMartijn Smitshoek28-Feb-21 23:39 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
CARNESECCHILuc1-Mar-21 0:42
MemberCARNESECCHILuc1-Mar-21 0:42 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
honey the codewitch1-Mar-21 4:10
mvahoney the codewitch1-Mar-21 4:10 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
obermd1-Mar-21 4:16
Memberobermd1-Mar-21 4:16 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
milo-xml1-Mar-21 5:41
professionalmilo-xml1-Mar-21 5:41 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
honey the codewitch1-Mar-21 5:46
mvahoney the codewitch1-Mar-21 5:46 
GeneralRe: And when you depend on multithreading to be unpredictable, it isn't! Pin
milo-xml2-Mar-21 4:33
professionalmilo-xml2-Mar-21 4: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.