diff options
author | Johannes Schanda <schanda@itestra.de> | 2013-07-10 10:32:20 +0200 |
---|---|---|
committer | Johannes Schanda <schanda@itestra.de> | 2013-07-10 10:32:20 +0200 |
commit | be1761cff29995a03337319effcadb07b34cde30 (patch) | |
tree | 8d9290f6adf65b8ec5eefb794fee3ed736b615b2 /src | |
parent | 1891587b43da42d99ffab26517972523a6f80123 (diff) | |
download | genivi-common-api-runtime-be1761cff29995a03337319effcadb07b34cde30.tar.gz |
Adapt documentation of event subscription methods
Explain illegal proxy building in callbacks
Offer suggestions for how to avoid this issue
Diffstat (limited to 'src')
-rw-r--r-- | src/CommonAPI/Event.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/CommonAPI/Event.h b/src/CommonAPI/Event.h index b86f58c..b032da9 100644 --- a/src/CommonAPI/Event.h +++ b/src/CommonAPI/Event.h @@ -43,7 +43,12 @@ class Event { /** * \brief Subscribe a listener to this event * - * Subscribe a listener to this event + * Subscribe a listener to this event. + * ATTENTION: You should not build new proxies or register services in callbacks + * from events. This can cause a deadlock or assert. Instead, you should set a + * trigger for your application to do this on the next iteration of your event loop + * if needed. The preferred solution is to build all proxies you need at the + * beginning and react to events appropriatly for each. * * @param listener A listener to be added * @return A token identifying this subscription @@ -54,6 +59,11 @@ class Event { * \brief Subscribe a cancellable listener to this event * * Subscribe a cancellable listener to this event + * ATTENTION: You should not build new proxies or register services in callbacks + * from events. This can cause a deadlock or assert. Instead, you should set a + * trigger for your application to do this on the next iteration of your event loop + * if needed. The preferred solution is to build all proxies you need at the + * beginning and react to events appropriatly for each. * * @param listener A cancellable listener to be added * @return A token identifying this subscription |