Recent Changes - Search:

edit SideBar


An accessor that makes an asynchronous request (e.g. an HTTP request) may receive the response after the swarmlet has stopped executing. What should it do with the response? Currently, in the Ptolemy host, it handles the response as normal, but if it tries to produce an accessor output, an exception is triggered, indicating that you can't produce an output when the swarmlet is not running. This exception occurs frequently, and is annoying. Possible solutions:

  1. Specify a timeout, and don't allow the model to stop executing until the timeout expires. This would give a more deterministic termination of a model. It would require some minor extension to Ptolemy II, as I believe there isn't currently any mechanism for an actor to _prevent_ termination of a model execution (it can trigger termination, but not prevent it). A potential problem is that requests could keep coming in, preventing the execution from ever stopping.
  2. Ignore any outputs produced when the model is not running, perhaps simply logging them to stdout or stderr.
  3. Some hybrid solution, where an accessor could request continued execution, but an override mechanism is provided.

See Also

Edit - History - Print - Recent Changes - Search
Page last modified on November 04, 2016, at 04:05 PM