What APIs come with built-in background thread handling

A few APIs come with built in multi-threading - if you want your code to run on a background thread, you don't have to do any special set up to do that.

Specifically they are

  • The Actions API - if you override asynchronous to return true (or don't override it - for historical reasons this is the default), your action's performAction method will run in the background
  • The Nodes API - to compute node children that are expensive to create, use ChildFactory and specify true as the boolean argument to Children.create()
  • Various parsing APIs - for syntax highlighting languages and so forth - usually you just provide a task to do, and it will automatically call you in the background when a reparse is being done
  • QuickSearch API - searchers are typically called in background thread by infrastructure in SearchProvider.evaluate(...)
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo