serverFrame.scheduleAfter()

  • s.scheduleAfter(s1,s2,s3,...)
  • var ar = new Array(s3,s4,s5,...);s.schedulaAfter(ar)
  • s.scheduleAfter(win)
  • s.scheduleAfter(s1,ar,win,s2)
  • Schedules the "onReturn()"function of s after the return of WebServer requests from the specified serverFrames. Note that the "onReturn()" functions of these serverFrames are executed in parallel with the "onReturn()"function of the scheduled serverFrame. A scheduled serverFrame does as a rule not submit anything to the server itself. Its only role is to wait until a specified number of server requests from other serverFrames have returned, and take some action based on the results of these, e.q.computing or submitting a new set of serverFrames. Animation could also be an interesting application.

    As a shorthand, a set of serverFrames can be put into an array, and this array can be set as a parameter to the scheduling serverFrame. This is meant for very complex applications, in which different sets of scheduled serverFrames are waited upon by many scheduling serverFrames. All serverFrames within a particular window can be also scheduled as a group. There is no restiction on the number an order of scheduled serverFrames or the number an order of serverFrames they are waiting on. Scheduled serverFrames can also be part of other scheduling serverFrames lists, so whole cascading applications can be built.

    Note that there is no check for circularity. Deadlock situations are very easy to program, and are wholly the responsability of the programmer. Also, this is an experimental facility that has not been tested very extensively. I am not sure if the (very simple) scheduling algorithm works correctly in all cases, and whether synchronizing or race conditions can appear. Use it at your own risk.