C++ Singleton Threading problem -
I have C + Singleton that runs as a separate thread. This singleton comes from the base class provided by a library and overrides the lawn (...) method. The onologian method is synchronous, if we accept the logon attempt, then it wants to know immediately.
The problem is that we need to pass the logon information via a security server message. We can register the callback with the security server listener (a separate thread) to obtain the results of the logon authentication message Are there. My question is how do I block in the login mode as if I can wake the thread by callback, I have registered with the security server listener thread, and how can I use the feedback received from the security server in a thread I should safely (ie, I should be able to handle multiple concurrent logon requests).
I'm completely stumped.
Use empty semiconductor after you send the credentials to the security server, take a sequa as it is empty Because it will stop execution. After that, the callback function is posted in the SackAfire. After this the execution on the original thread will resume.
Because callbacks usually allow an anonymous value passed as a parameter, so you can register an indicator for a data structure that can be filled with the reaction.
Comments
Post a Comment