I’m writing my own NetBeans plugin for Gradle. Today I’ve tried to upgrade the tooling API from 2.12 to 2.13 (usually it is painless replacing jars.) Though I see something “strange” now.
Some background: NetBeans executes task in separate thread groups and marks task finished when all the threads are finished in the group. I have the following flow (simplified):
- pconn = conn.getProjectConnection() // ActiveThreads: 1
- config build launcher from pconn // ActiveThreads: 1
- buildLauncher.run() // ActiveThreads: 3
- pconn.close() // ActiveThreads: 2
So when the flow finishes I have still 1 thread active in the group.