writeBlocking in a Vision Client

The recommendation is for the EDT, the foreground thread. All UI events run on this foreground thread. If you run a system function that has to contact the gateway, the foreground of the Vision client stalls for the round trip. If you are making such calls in many events all over the place, the UI will lag, especially on a WAN or VPN.

The deprecated system.tag.write() call is one of the few that isn't a problem, because it is really Async without the callback. Fire and forget, so to speak, and doesn't stall the UI. (It may be deprecated, but I don't see any of the deprecated functions going away any time soon.)

Note that the actionPerformed event on a button, because it is user-initiated, is generally an OK place for one or two such calls. Anything more complicated should be delegated to a background thread, where there won't be any UI interaction. However, background threads cannot update the UI themselves--deadlock risk. See this topic for more information: