Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: servers.stopmemoryevents - Function Up: servers - Tool Previous: servers.memory - Function


servers.sendmemoryevents - Function



Package utility
Module tasking
Tool servers


Enable the generation of memory events


Synopsis
sendmemoryevents()


Description
servers can send a memory event whenever it detects that the memory used by a server has changed. The value associated with the memory event is a record identical to the one returned by the memory function.

By default servers does not send events and this function must be called to initiate this behaviour. The complimentary function is stopmemoryevents.



Returns
nothing


Example
      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.



next up previous contents index
Next: servers.stopmemoryevents - Function Up: servers - Tool Previous: servers.memory - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15