---
feature_story: FS_14_59_14_06
feature_title: pending requests
feature_status: TEST
---

This feature splits client into two OS processes:
*   parent to control user interaction
*   child to wait for pending request

The initial motivation was to provide indication (spinner) of long-running request to the user.<br/>
But it can be extended to handle switch over to another server in case of server unavailability, etc.

# Spinner

The spinner is only used for:
*   `ServerAction.ProposeArgValues` = Tab
*   `ServerAction.DescribeLineArgs` = Alt+Shift+Q
Specifically, `ServerAction.RelayLineArgs` simply blocks within the same OS process until requests completes.

The spinner is enabled by default. To disable it, set `ClientConfig.show_pending_spinner` to `False`.

# Client components implementing pending requests

Depending on conditions, the same request to server is executed via different components:

| ServerAction     | Client       | Mode  | Parent            | Child           | IPC pipe | Response | BytesSrc       | BytesDst         | BytesHandler                              | ResponseHandler                       | ClientCommand                                          |
|------------------|--------------|-------|-------------------|-----------------|----------|----------|----------------|------------------|-------------------------------------------|---------------------------------------|--------------------------------------------------------|
| ProposeArgValues | ClientLocal  | Sole  | N/A               | N/A             | No       | data     | N/A            | N/A              | N/A                                       | ClientResponseHandlerProposeArgValues | ClientCommandLocal                                     |
| DescribeLineArgs | ClientLocal  | Sole  | N/A               | N/A             | No       | data     | N/A            | N/A              | N/A                                       | ClientResponseHandlerDescribeLineArgs | ClientCommandLocal                                     |
| RelayLineArgs    | ClientLocal  | Sole  | N/A               | N/A             | No       | data     | N/A            | N/A              | N/A                                       | ClientResponseHandlerRelayLineArgs    | ClientCommandLocal                                     |
| -                |              |       |                   |                 |          |          |                |                  |                                           |                                       |                                                        |
| ProposeArgValues | ClientRemote | Sole  | SoleProcWorker    | N/A             | No       | text     | BytesSrcLocal  | N/A              | BytesHandlerTextProposeArgValuesOptimized | N/A                                   | ClientCommandRemoteWorkerTextProposeArgValuesOptimized |
| DescribeLineArgs | ClientRemote | Sole  | SoleProcWorker    | N/A             | No       | JSON     | BytesSrcLocal  | N/A              | BytesHandlerJson                          | ClientResponseHandlerDescribeLineArgs | ClientCommandRemoteWorkerJson                          |
| RelayLineArgs    | ClientRemote | Sole  | SoleProcWorker    | N/A             | No       | JSON     | BytesSrcLocal  | N/A              | BytesHandlerJson                          | ClientResponseHandlerRelayLineArgs    | ClientCommandRemoteWorkerJson                          |
| -                |              |       |                   |                 |          |          |                |                  |                                           |                                       |                                                        |
| ProposeArgValues | ClientRemote | Split | ParentProcSpinner | ChildProcWorker | Yes      | text     | N/A            | BytesDstReceiver | BytesHandlerTextProposeArgValuesOptimized | N/A                                   | ClientCommandRemoteWorkerTextProposeArgValuesOptimized |
| DescribeLineArgs | ClientRemote | Split | ParentProcSpinner | ChildProcWorker | Yes      | JSON     | BytesSrcSender | BytesDstReceiver | BytesHandlerJson                          | ClientResponseHandlerDescribeLineArgs | ClientCommandRemoteWorkerJson                          |
| RelayLineArgs    | ClientRemote | Split | ParentProcSpinner | ChildProcWorker | Yes      | JSON     | BytesSrcSender | BytesDstReceiver | BytesHandlerJson                          | ClientResponseHandlerRelayLineArgs    | ClientCommandRemoteWorkerJson                          |
| -                |              |       |                   |                 |          |          |                |                  |                                           |                                       |                                                        |

The most used conditions in production are with `ParentProcSpinner` and `ChildProcWorker`.
