Search:
Type: Posts; User: @EE@
Search:
Search took 0.02 seconds.
-
April 18th, 2022, 01:12 AM
that link has good information on thread controls. However, it does not cover cases when thread is running and by click of a button, thread is terminated which is not recommended by many. Usually...
-
April 16th, 2022, 10:51 AM
a thread is running. how to cleanly stop m_thread from running regardless what it is doing.
m_thread=AfxBeginThread(RunThread, (aDlg*)this);
if (m_thread)
{
DWORD dwRet;
do
{
dwRet =...
-
March 16th, 2022, 01:32 AM
thanks for the link. useful.
-
March 15th, 2022, 01:25 AM
Victor:
1. And what are the reasons you "can not use worker thread for this function"?
need something more deterministic. The thread operation does not quite sync with operation in the library...
-
March 13th, 2022, 09:53 PM
Have a function as part of a dialog class which has some loops and so on and works. But during its run, the dialog needs its controls , etc. refreshed and update. For reasons can not use worker...
-
March 9th, 2022, 10:36 AM
1. yes, this thread simply returns. No even driven exit is used.
2. Like may typical examples, this library is Initialized for providing callback function. library has exit routine that gets called...
-
March 9th, 2022, 05:07 AM
the thread includes a series of steps till it returns. The first step is to initialize the library. I moved it out of the thread and seems to resolve it. Not 100% sure yet. Need to do more testing....
-
March 8th, 2022, 10:45 AM
this is the code i use to check for thread exit.
void CMyDlg::OnBnClickedButton()
{
m_pWinThread = AfxBeginThread(MyThreadFunc, (LPVOID)this);
DWORD ret;
do
{
ret =...
-
March 7th, 2022, 03:37 AM
How many threads are started in your application?
in one of the tabs only when a button is clicked on.
Does the every tab dialog start the thread?
click on a button
How did you check...
-
March 7th, 2022, 02:34 AM
only one thread get started in one of the tabs by clicking on a button. the rest are regular buttons.
-
March 6th, 2022, 10:19 PM
my application is multi tab application which uses tab tree control. The APPCRASH may not be related to start of the thread. I could not see any memory lean risk code. I use CREATE for each dialog in...
-
March 6th, 2022, 09:20 PM
this is the way I start my thread and get going to the end.
https://www.codeproject.com/Articles/2855/Waiting-for-a-thread-to-terminate
-
March 5th, 2022, 11:46 AM
after thread exits. After all processing done. After X on the top right is clicked on to close the APP. After APP apparently closed, After a few seconds, it launches again on its own. checked the...
-
March 5th, 2022, 03:47 AM
VS2015 mfc app with a button click launches a thread. After thread exists and dialog's X on top right is clicked on, it closes and re-launches. The event viewer shows the event name APPCRASH. problem...
-
March 3rd, 2022, 03:33 AM
is it safe for the thread to call non UI member function of the Dialog that launched it?.
void CMyDlg::callme() //this is not part of UI. just a member of the Dialog
{
///....
}
.......
-
March 2nd, 2022, 10:43 AM
I know How to set a value to a UI control using postmessage but not reading it? How use the postmssage to read value from UI textbox?.
I have used sendmessage to invoke a button on UI. Is this...
-
March 2nd, 2022, 01:27 AM
I have not dealt with threads and got stock with writing an app for data acquisition experiments.
1) A thread launched by AfxThreadBegin, could it access Dialog controls and members for read only?....
-
October 21st, 2021, 11:29 PM
why you do not use std::threads?. What are other alternatives based on your experiences?. Specially for passing array of objects to it in C++. I read _beginthread(ex) are appropriate for C++.
-
October 20th, 2021, 01:53 AM
This is what I mean?. Condition variables versus events.. ?
https://en.cppreference.com/w/cpp/thread/condition_variable
-
October 17th, 2021, 08:41 PM
how about condition variables versus events?. Both work at kernel level?. Which is more proper to use?.
-
October 16th, 2021, 10:15 PM
need examples of a proper way to wait for a flag change in another thread without blocking the events?. In C++/windows.
-
October 12th, 2021, 01:14 AM
thank you 2kaud and others.
-
October 10th, 2021, 09:33 PM
Is there a reason why the SetThreadPriority is removed by 2Kaud?. Maybe it is not genuine c++?? may actually run faster without it??.
is the "writetoFile" thread safe?. I like to make sure the each...
-
October 9th, 2021, 09:36 AM
I added threads to my array of objects. It crashes when main exits. Also, static member gives an error. not sure how to handle these two cases?.
#include <iostream>
#include <vector>
#include...
-
October 8th, 2021, 01:49 AM
Got multiple threads each with an instance of a class accessing a function Add. In what cases that kind of a function would be unsafe if accesses by multiple threads?. examples?.. I got to do more...
|
Click Here to Expand Forum to Full Width
|