Add timeout_initialize and timeout_terminate as getter functions in each external CloudI API implementation. Add a terminate_exception in each non-C (and non-C++) external CloudI API implementation. Make a pending termination of an external service wait for the timeout_terminate period for the socket to close. The terminate situation is provided by a terminate return value (or exception in non-C (and non-C++)) if execution is processing a service request, otherwise a return occurs from the poll() function call (the terminate_exception object provides the termination timeout value).