3.1.4.7 Getting the Number of Available Runspaces in a RunspacePool

The higher layer can initiate getting the number of available (section 3.2.1.4.1) runspaces in a RunspacePool on the server at any time as long as the RunspacePool is in an Opened (section 3.1.1.2) state. The following activities happen as part of getting the number of available runspaces in a RunspacePool:

  1. The client creates a new entry in the RunspacePool CI Table (section 3.1.1.2.5) and blocks the higher-layer until step 4.

  2. The client constructs a GET_AVAILABLE_RUNSPACES message (section 2.2.2.11) and sends it (section 3.1.5.1.1) to the server using a wxf:Send message.

  3. The client waits to receive (section 3.1.5.1.2) a RUNSPACE_AVAILABILITY message (section 2.2.2.8) associated with the RunspacePool CI Table entry from step 1. This step assumes that the client has already sent out a wxf:Receive message for the RunspacePool as specified in section 3.1.4.1.

  4. The client removes the RunspacePool CI Table entry, unblocks the higher layer, and communicates the result extracted from the SetMinMaxRunspacesResponse field of the received RUNSPACE_AVAILABILITY message.