proc_status (EVENT name)

proc_status2 (EVENT name, ENTITY* ent)

Checks how many instances of a given function started by the given entity are currently running simultaneously.

Parameters:

name - pointer of the function.
ent - pointer of the my entity of the function.

Returns:

0 = no function instance running.
>0 = number of instances running.

Speed:

Medium

Remarks:

#define wait_for(f)  while (proc_status(f)) wait(1)
#define wait_for_my(f)  while (proc_status(f,my)) wait(1)

Example:

myfunction(myparameter);  // call a function with many wait()s (one instance only) 
wait_for(myfunction); // wait until myfunction is finished (lite-C only)

See also:

function, wait, proc_late 

► latest version online