Can a thread method call another method in other thread ?
Hi,
In a worker thread i have a method Doing and would like to call a method named Move_EntradaToBaseline that to be in other thread ... Especificaly ... the thread where i created the worker thread ...
I did it ... but i receive a "Violation" message when the method Move_EntradaToBaseline tried to use a single object CString.
Thread 1 = My user interface
Thread 2 = Worker thread started inside professional
From STProfessional i would like to start Move_EntradaToBaseline() in STPacoteFabrica ...
Inside STFabrica, STProducao, STCelula, STPacoteFAbrica, STLogistica, STProjeto e STPacoteCliente i will make a task files and i put then in a directories that a worker Thread (Thread 2) will get and manage calling function tasks (Or methods) inside the ones ...
I don´t no is it possible ... but in the process i need this is important ...
Last edited by SNArruda; April 1st, 2009 at 11:11 AM.
Thread 1 = My user interface
Thread 2 = Worker thread started inside profissional (See code). (Blackground).
From STProfessional i would like to start Move_EntradaToBaseline() in STPacoteFabrica ...
My project is basicaly: Inside STFabrica, STProducao, STCelula, STPacoteFAbrica, STLogistica, STProjeto e STPacoteCliente i will make text files containing tasks informations and i put then into directories where a worker Thread (Thread 2) get it and manage it, openig it, reading the tasks informations e calling the apropriated function inside classes STFabrica, STProducao, STCelula, STPacoteFAbrica, STLogistica, STProjeto e STPacoteCliente that efectively do the task.
My Objects (Or classes if you prefer) are just a Set of CString object containing informations about directories, Names, Caracteristics,etc. Sametimes i use deque<CString> for mantain necessary lists.
I receive the error when was did my first test that call Move_EntradaToBaseline()...(Thread 1, STPacoteFabrica.cpp) from Doing() (Thread 2, STProfessional.cpp) and the error happen.
I noted that, when i put a breakpoint in the line where the error heappen, Looking for variables content, they are invalid, with dirty content or invalid pointers ... I don´t now wy this heappen.
if someone needs i can send the code files ... I realy need help ... the approuch is essencial in my project.
Sorry by poor english, I´m brasiliam and student for this language ...
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.