how to lock function used by thread?
-
if i have a function will used by a thread, how i lock it? i do not want the thread to finish..., as below
Main function()
{
----lock this area
code
another function()
code
code
----unlock this area
}basically the Main function wont be executed by another thread until it's done..? how?
-
if i have a function will used by a thread, how i lock it? i do not want the thread to finish..., as below
Main function()
{
----lock this area
code
another function()
code
code
----unlock this area
}basically the Main function wont be executed by another thread until it's done..? how?
Why don't you try Thread Synchronization mechanisms? Following may help you. Managed Thread Synchronization[^] How to create a Simple Lock Framework for C++ Synchronization[^]
[Delegates] [Virtual Desktop] [Tray Me !]
-Malli...! :rose:****