Do not pass BuildContext to GeneratorTask 90/104790/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 7 Mar 2023 18:21:20 +0000 (19:21 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 7 Mar 2023 18:22:18 +0000 (19:22 +0100)
commit5349b185edd48ead221cf9839d73307a23e8b3dd
tree21c3c48f6954e87745da20354331587cb866d417
parent6945b9293e7f56988226068129800e3441e9cf6d
Do not pass BuildContext to GeneratorTask

We have previously decomposed OutputStream creation and refresh
notification. Now move the refresh notification processing to
YangToSourcesProcessor.

This improves the plugin in that:
- WriteTask is simpler (and smaller in some runtimes)
- BuildContext interactions are more localized
- BuildContext executes on the initial thread, improving its
  confinement

JIRA: YANGTOOLS-745
Change-Id: Ia192dbe5134349a78f2290bbf7a9b7ff9d236746
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
plugin/yang-maven-plugin/src/main/java/org/opendaylight/yangtools/yang2sources/plugin/GeneratorTask.java
plugin/yang-maven-plugin/src/main/java/org/opendaylight/yangtools/yang2sources/plugin/YangToSourcesProcessor.java