First, what I did (a minimal sample would be provided if I hadn’t done anything stupid):
I have a GUI application that needs to support multiple network interfaces in order to change the content displayed in the GUI. Network interfaces are implemented as plugins that load dynamically when the GUI starts. The GUI application provides a boost :: asio :: io_service object, which is passed through a link to the interfaces, so they can use it to build asynchronous I / O. In the GUI thread, this io_service object is polled to synchronize the access of network interfaces to content.
Now the problem is that the handlers are not called by the io_service object when it is polled. To narrow this down, I implemented only one interface and created an io_service object in it, which still causes polling from the GUI thread and which works.
Now my question is: is it possible that there is a general problem with passing the io_service object to the DLL functions loaded at runtime?
If the scenario is too unclear, I will give a minimal example.
EDIT: I feel really stupid :) Just hacked into a minimal example, and that of course works like a charm. This pretty much means that the problem arises from some other piece of software.
So thank you all for their input!
To make this question at least a little useful: Anyone who wants to do something like this (plug-ins for the network synchronized via boost :: asio :: io_service), you can download a minimal example here .
c ++ boost dll boost-asio
LiMuBei
source share