QMF for Windows API functions are synchronous. When an API is called in an application, it blocks, or does not return, until the requested action completes. The code just below the line calling the API will not be executed until the API completes its function. This implementation is simplifies programming in the client application. However, if the application is single-threaded, it will not be able to respond to user input or perform screen refreshes while it is waiting for a QMF for Windows API function to return.
The QMF for Windows API responds to one function call at a time from a client. If the client application is multi-threaded, you must:
If it is necessary for the application to be synchronous, the programmer has to create a new thread within the application and call the API from the new thread. The new thread will then be blocked, but all other threads will continue to execute normally. The programmer has to manage the timing and execution of the threads.
When developing multi-threaded applications, note that the QMF for Windows API responds to one function call to complete before making another, or create multiple instances of the QMF for Windows API (one for each thread using the API).