This is a tricky problem an an immediate consequence of the dynamic configuration favoured by this design. We avoid a centralised configuration and thus there are no automatic rules to enforce consistency. It would thus be possible to start using a dependency in singleton style, but to switch to service style later, after the fact. An attempt was made to prevent such a mismatch by static initialisiation; basically the presence of any Depend<SRV>::ServiceInstance<X> would disable any usage of Depend<SRV> in singleton style. However, such a mechanism was found to be fragile at best. It seems more apropriate just to fail when establishing a ServiceInstance on a dependency already actively in use (and to lock usage after destroying the ServiceInstance). This issue is considered rather an architectural one, which can not be solved by any mechanism at implementation level ever |
||
|---|---|---|
| .. | ||
| clang-static-init-1.cpp | ||
| clang-static-init-2.cpp | ||
| clang-static-init.hpp | ||
| crash_gdb_jessie-2015-08.sh | ||
| DIR_INFO | ||
| SConscript | ||
| try.cpp | ||