From this post https://answers.flexsim.com/questions/67068/how-to-make-asynchronous-call-to-web-service.html, I know this command: applicationcommand("downloadhttprequest", verb, server, object, data, silent, filePath, callbackNode) is asynchronous and the callbackNode will be executed after the request has complete. Could someone help me understand how does this function work under the hood? Since FlexSim is single threaded, I assume this function is executed in a separate thread and once it finishes, it will push the callbackNode on top of FlexSim's event queue and get scheduled next. However, in this post https://answers.flexsim.com/questions/67556/is-flexsim-thread-safe.html it says FlexSim's event loop is not thread safe, then how is the callbackNode safely added to the event queue?
Also, not sure if it's related, in the cpp code provided in this post:https://answers.flexsim.com/questions/67556/is-flexsim-thread-safe.html
There is a line:
PostMessage(window, FLEXSIM_MESSAGE_USER_NODEFUNCTION, (WPARAM)registernode, NULL)
Does this line force the registernode to be executed immediately? If so, how does this line interact with FlexSim event loop? Thank you!