-
Type: Improvement
-
Resolution: Done
-
Priority: Critical - P2
-
Affects Version/s: None
-
Component/s: Networking
-
Labels:None
-
Fully Compatible
-
Platforms 12 (04/01/16)
-
0
In order to allow the ThreadPoolTaskExecutor to issue NetworkInterface::startCommand outside the executor's mutex, it is necessary that startCommand return some indication as to whether or not the network interface takes ownership of the operation.
Proposed behavior:
NetworkInterface::startCommand returns false if NetworkInterface::shutdown has already started, and true otherwise. If it returns true, then the onFinish argument will be executed by NetworkInterface eventually; otherwise, it will not. setAlarm should behave similarly
NetworkInterface::shutdown blocks until callbacks assocated with all accepted commands and alarms have executed. It is OK (preferred?) for shutdown() to cause some or all pending callbacks to execute with a "CallbackCanceled" status in order to expedite shutdown.