MultiThreading/Synchronization related problem
-
Hi Friends, I have been asked this below question in a interview related to MultiThreading/Synchronization I don't have much expertise in the same area. Please help me with the solution. Thanks in Advance Problem-> Develop a C++ program to demonstrate threading and synchronization. Char code generated by main process on press of key. (int iChar = getch(); ) Application will accept key between 0 to 9 only. Three threads are spawned by main process to display key pressed Any one of the thread will display the Number key pressed and and Thread ID If No key is pressed Threads will wait for input. Process will be terminated if Key '0' is pressed.
-
Hi Friends, I have been asked this below question in a interview related to MultiThreading/Synchronization I don't have much expertise in the same area. Please help me with the solution. Thanks in Advance Problem-> Develop a C++ program to demonstrate threading and synchronization. Char code generated by main process on press of key. (int iChar = getch(); ) Application will accept key between 0 to 9 only. Three threads are spawned by main process to display key pressed Any one of the thread will display the Number key pressed and and Thread ID If No key is pressed Threads will wait for input. Process will be terminated if Key '0' is pressed.
Amrit Agr wrote:
Please help me with the solution.
Exactly what help are you asking for? If you are expecting someone else to write the code for you, I am afraid you have come to the wrong place. And if you have no expertise in this area, why are you being interviewed for such a role? Incidentally, your question has nothing to do with C++/CLI, it is should have gone to C / C++ / MFC Discussion Boards[^].