Search found 138 matches

by art-ganseforth
Sat Feb 15, 2020 12:51 am
Forum: C++ Development
Topic: wxThread / newbie
Replies: 19
Views: 237

Re: wxThread / newbie

On my system, the posted code worked as it is. But for my application i don't even need to initiate the threads by a global timer. I've already a version that doesn't crash my application (but i have to implement a sync-technic). This new version is a fire-and-forget one. I call it with with a char*...
by art-ganseforth
Fri Feb 14, 2020 11:27 pm
Forum: C++ Development
Topic: wxThread / newbie
Replies: 19
Views: 237

Re: wxThread / newbie

Okay... I think i have what i want. I wrote a very small class derived from wxThreadHelper . Here is the code: ///////////////////////////////////////////////////////////////////////////////////////////// // Test-application to see id and how two // wxThreadHelper-instances work parallel ///////////...
by art-ganseforth
Fri Feb 14, 2020 5:44 am
Forum: Compiler / Linking / IDE Related
Topic: Missing setup.h when upgrading to wx3.1.3
Replies: 13
Views: 387

Re: Missing setup.h when upgrading to wx3.1.3

I'm from germany. I think, my' problem' is not C::B. It's almost the opposite: I never worked without IDE. I never wrote a makefile etc. So, i don't know how all of this is working together. Years ago i downloaded an old wxDevC++-setup as a package, that worked immideately after installing. This i u...
by art-ganseforth
Fri Feb 14, 2020 2:13 am
Forum: C++ Development
Topic: wxThread / newbie
Replies: 19
Views: 237

Re: wxThread / newbie

new clsParserThread(Parser,Code))->Run(); in between. That crashes The Create() is missing (unless you put that into the thread ctor). The whole creation and starting of a thread is a 3-step process. clsParserThread *thread = new clsParserThread(Parser,Code); if( thread->Create() == wxTHREAD_NO_ERR...
by art-ganseforth
Fri Feb 14, 2020 2:13 am
Forum: C++ Development
Topic: wxThread / newbie
Replies: 19
Views: 237

Re: wxThread / newbie

But if your main "consumer" of CPU power is that one piece of code that takes a Parser and Code and returns some result, that's where you should start. This is my plan, but it is not so simple. The wxTimer-event calls only one 'entrypoint'. After this, everything is scripted - with several subcalls...
by art-ganseforth
Fri Feb 14, 2020 1:22 am
Forum: C++ Development
Topic: wxThread / newbie
Replies: 19
Views: 237

Re: wxThread / newbie

However (step by step), why the answer to my first question is 'No'? (new clsParserThread(Parser,Code))->Entry() This will just create the thread object and then call the Entry method in the context of the main thread. Nothing else. Which would explain why your program still works, but without usin...
by art-ganseforth
Fri Feb 14, 2020 1:01 am
Forum: C++ Development
Topic: wxThread / newbie
Replies: 19
Views: 237

Re: wxThread / newbie

What is a workerthread? A "worker thread" is just a generic name for any additional (non-main) thread that does some "work". Another term you might see for this is "secondary thread". Nothing special. Okay, 'workerthreds' = 'threds' except of the main-thread... Their number is not determined. It is...
by art-ganseforth
Fri Feb 14, 2020 12:57 am
Forum: C++ Development
Topic: wxThread / newbie
Replies: 19
Views: 237

Re: wxThread / newbie

A "clean" version for your problem would be to have a pool of worker threads, and a wxMessageQueue to distribute jobs among them. I mean this: i've several wxWindows with different content, that should be updated. Some of them need to process a lot of (script-)funtions to update, others are very si...
by art-ganseforth
Fri Feb 14, 2020 12:36 am
Forum: C++ Development
Topic: wxThread / newbie
Replies: 19
Views: 237

Re: wxThread / newbie

ow, after i implemented this wxThread-class, i expected that the CPU-usage distributes over then one cores, but this is not the case. One core is still used at 100% and the others are not used. So i wonder why? Hard to tell. Too little and too generic information. How many worker threads do you hav...
by art-ganseforth
Fri Feb 14, 2020 12:19 am
Forum: C++ Development
Topic: wxThread / newbie
Replies: 19
Views: 237

Re: wxThread / newbie

Instead of calling Parser->Exec(Code);, i now want to use this call: (new clsParserThread(Parser,Code))->Entry(); Is this correct so far, which means, is the ecexution of 'Code' by 'clsParserThread' done parallel to the continued execution of the calling (parent) clsParser? No, no and no. If you st...
by art-ganseforth
Thu Feb 13, 2020 11:55 pm
Forum: C++ Development
Topic: wxThread / newbie
Replies: 19
Views: 237

Re: wxThread / newbie

In fact, i used the wxThread example just to understand the basic principal, because is is the first time i try around with wxThread. I used code that i dicribed in my application, and my application compiles and runs as before, but unfortunatly i see no difference at all. For explanation: Most CPU-...
by art-ganseforth
Thu Feb 13, 2020 10:12 pm
Forum: C++ Development
Topic: wxThread / newbie
Replies: 19
Views: 237

wxThread / newbie

Hello, some newbie-questions concerning multithreading... I have a script-interpreter-class (clsParser) with severai. nested instances. Most script-executions are triggert by events or parent-instances. Now i want to deligate some of these calls to parallel threads. Therefore i created a small class...
by art-ganseforth
Tue Feb 11, 2020 7:44 pm
Forum: Compiler / Linking / IDE Related
Topic: Missing setup.h when upgrading to wx3.1.3
Replies: 13
Views: 387

Re: Missing setup.h when upgrading to wx3.1.3

Hello, i've red a bit in your links, but for the moment, this is too complicated for me. I've not enough time to learn all of this - not at least because I'm not a native english-speaker. I've a provisoric solution, that i can use for my application until i find the time to lean this... Thank you an...
by art-ganseforth
Sun Feb 09, 2020 7:38 pm
Forum: Compiler / Linking / IDE Related
Topic: Missing setup.h when upgrading to wx3.1.3
Replies: 13
Views: 387

Re: Missing setup.h when upgrading to wx3.1.3

I already tried to change this for a short while, but i could not find the correct flags and as i was not shure if this is the reason, i've stopped it. Currently i do some other things. I'll try later it again... I'll mark this thread as solved if i'm successfull. Otherwise i'll continue it probably...
by art-ganseforth
Sun Feb 09, 2020 4:23 pm
Forum: Compiler / Linking / IDE Related
Topic: Missing setup.h when upgrading to wx3.1.3
Replies: 13
Views: 387

Re: Missing setup.h when upgrading to wx3.1.3

doublemax wrote:
Sun Feb 09, 2020 3:30 pm
Did you actually build the wxWidgets libraries after switching to 3.1.3? If yes, with command line(s) did you use?
No, i never did it myself. I just downloded the binaries (see post before).