claim_processes

BAP Online Manuals : Library Reference : Library by Name : claim_processes
Previous: check_equal
Next: clause

6.2.19. claim_processes

claims processes for an application

SYNOPSIS

INCLUDE 'system.h'
claim_processes(Number)

SYNTAX

claim_processes(Number) (i)

ARGUMENTS

integer(Number) (i) The Number of processes to be claimed

DESCRIPTION

This predicate claims as many processes on the network as given by number. This should ensure that enogh servers are available for your application. You still have to allocate servers as you need them.

However, there are some things too consider carefully. First, you must ensure, that the number of processes you claim is actually the amount you need. If only one server is missing, your application might hang. Secondly, this version of BAP is only meant for single applications. So all this predicate does is to check how many servers are currently available and to call create_processes(Missing) with Missing being the difference between the amount of servers needed and those available. This means, that if you have two applications running, one claiming X processes, the other Y processes, actually less than X+Y servers might be present. This can cause a hanging system in this version of BAP.

Nevertheless you should use this predicate in your programs, because that way they will run unchanged on multi-application platforms.

ERRORS

No runtime Errors.

LAYERS

client-server, object

RELATED PREDICATES

alloc_server , dcall , exec , xcall , create_processes , release_processes


BAP Online Manuals : Library Reference : Library by Name : claim_processes
Previous: check_equal
Next: clause