Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
Package | utility | |
Module | tasking | |
Tool | servers |
By default servers does not send events and this function must be called to initiate this behaviour. The complimentary function is stopmemoryevents.
include 'servers.g'; whenever defaultservers->memory do { local memory := $value; total := 0; for (i in ind(memory)) { total +:= memory[i]; } print 'aips++ memory usage is', total; } defaultservers.sendmemoryevents(); # At this point the whenever may receive events defaultservers.stopmemoryevents(); # At this point the whenever will not receive any events.This example creates a ``whenever'' statement that will print the total memory used by aips++. However the defaultsaervers will not emit memory events until the sendmemoryevents function is called.