Home Online Manual
Top
Back: parallelWaitN
Forward: parallelWaitAll
FastBack: numerDecom_lib
FastForward: realclassify_lib
Up: parallel_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.15.17.2 parallelWaitFirst

Procedure from library parallel.lib (see parallel_lib).

Usage:
parallelWaitFirst(commands, args[, timeout]); commands list, arguments list, timeout int

Return:
a list, containing at least one (if no timeout occurs) of the results of commands[i] applied to arguments[i], i = 1, ..., size(arguments).
The command parallelWaitFirst(commands, arguments[, timeout]) is synonymous to parallelWaitN(commands, arguments, 1[, timeout]). See parallelWaitN for details on optional arguments and other remarks.

Example:
 
LIB "parallel.lib";
ring R = 0, (x,y,z), lp;
ideal I = 3x3y+x3+xy3+y2z2, 2x3z-xy-xz3-y4-z2, 2x2yz-2xy2+xz2-y4;
ideal J = x10+x9y2, x2y7-y8;
list commands = list("std", "std");
list arguments = list(list(I), list(J));
parallelWaitFirst(commands, arguments);
==> [2]:
==>    _[1]=y15-y12
==>    _[2]=xy12+y14
==>    _[3]=x2y7-y8
==>    _[4]=x10+x9y2
See also: parallelWaitAll; parallelWaitN; tasks_lib.