My script has an asynchronous conversation that polls a queue for new messages, while the user performs other tasks. I've put the web_reg_async_attributes() into init, my callbacks are in asynccallbacks.c, and my main logic is in action.c The async polls every 5s, checking the message queue. When there is a message, I would like the callback to set a flag that the action.c has access to so that it can execute logic conditionally. I've tried using a global variable, declared in init, but it is not visible in asynccallbacks.c.
Is there a way to accomplish this? (I don't want to use files because I'm measuring activities that take less than a second and if I put the file system into the picture, my response times won't be representative).