anchor.diff:  }
   ----
   
  -Note that it is important for _getNextMessage_ to have a relatively short timeout (low seconds). Calls that get stuck in Java can cause the UI to become unresponsive and may require users to force close MATLAB without being able to save the workspace. Passing in a timeout of zero provides a non-blocking interface that returns empty if no messages are available.
  +Note that the _getNextMessage_ method expects a user settable timeout argument. In general it is important for blocking Java methods to have a timeout in order to prevent the main thread from getting permanently stuck inside Java. Otherwise this could cause the UI to become unresponsive and users may be forced to close MATLAB without being able to save their workspace. Being in a Java call also prohibits users from aborting an execution (ctrl-c), so timeouts should be reasonably short, i.e., in the low seconds.
  +
  +Passing in a timeout of zero served as a non-blocking interface that returned empty if no messages were available.
  +
  +The example below shows the Java Aggregator class being used from MATLAB. Note that primitive types are automatically translated between Java and MATLAB types, so there is no need to add an additional conversion layer.
   
   [source,matlab]
   ----
  
positive.code: subscriber = rossubscriber('/scan', @callback);  
  ----
  
  Overall, we found that the ROS support toolbox looks very nice and is a great example of how seamless external languages could be integrated with MATLAB. We also really liked that they offered a way to load log files (rosbags).
  
  One concern we had was that there didn't seem to be a simple non-blocking way to check for new messages, e.g., a _hasNewMessage()_ method or functionality equivalent to LCM's _getNextMessage(0)_. This would probably be useful for applications that combine data from multiple topics that may arrive at different rates (e.g. sensor feedback and joystick input events). We checked whether this behavior could be emulated by specifying a very small timeout, but any value below 0.1s seemed to never successfully return.
  
  [source,matlab]
  ----
  
negative.code: chatpub.send(msg);
  ----
  
  They offered three different APIs for receiving messages: blocking calls, non-blocking calls, and callbacks. This allowed users to choose the style they were most comfortable with.
  
  [source,matlab]
  ----
  