Top
Back: vdim
Forward: waitfirst
FastBack: Functions and system variables
FastForward: Control structures
Up: Functions
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

5.1.154 waitall

Syntax:
waitall ( list_expression )
waitall ( list_expression , int_expression )
Type:
int
Purpose:
Expects a list of open links (of mode ssi:fork, ssi:tcp, MPtcp:fork or MPtcp:launch) and waits until all of them are finished, i.e., are ready to be read.
In the first case, the command waits for all links to finish (or to crash, see below) and may therefore run forever.
In the second case, a timeout in milliseconds can be provided, forcing the command to terminate after the specified time. If the given timeout is 0, the command checks whether all links are finished or not, but does not wait for any link (polling).
Return values are:
-1: The read state of all links is "eof", see link, status. This might happen if all the links crashed.
0: timeout (or polling): None of the links is ready.
1: All links are ready. (Note: There might be links whose read state is "eof", but at least one link is ready.)
Example:
 
See waitfirst.

Top Back: vdim Forward: waitfirst FastBack: Functions and system variables FastForward: Control structures Up: Functions Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 3-1-6, Dec 2012, generated by texi2html.