Skip to content

Running multiple mg_mgrs in separate threads on version 7.10 #2266

Discussion options

You must be logged in to vote

All mg_* functions refer to an event manager
That statement is correct, it says that all calls to api functions and a manager must be on the same context (be it threads or interrupts)

If you run several managers, either in one or in different threads, they won't share anything among themselves, just make sure that all calls interacting with a manager are done from the same context as the manager.

What you cannot do is to run a manager in thread A and call a function that uses it from thread B. If you need to do something like this, like worker threads to handle requests, there is an example on how to do it properly: multi-threading.

Besides that, I don't understand your issue, our clients…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by scaprile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants