This is an automated email from the ASF dual-hosted git repository.
jtulach pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-html4j.git
The following commit(s) were added to refs/heads/master by this push:
new f031ed4d In asynchronous mode: schedule flush on first added task
f031ed4d is described below
commit f031ed4df296ac3213dca79a32d4737c2bcbab26
Author: Jaroslav Tulach <[email protected]>
AuthorDate: Mon Jul 4 20:11:29 2022 +0200
In asynchronous mode: schedule flush on first added task
---
generic/src/main/java/org/netbeans/html/presenters/spi/Generic.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/generic/src/main/java/org/netbeans/html/presenters/spi/Generic.java
b/generic/src/main/java/org/netbeans/html/presenters/spi/Generic.java
index 008b3335..f766a10e 100644
--- a/generic/src/main/java/org/netbeans/html/presenters/spi/Generic.java
+++ b/generic/src/main/java/org/netbeans/html/presenters/spi/Generic.java
@@ -734,10 +734,11 @@ abstract class Generic implements Fn.Presenter,
Fn.KeepAlive, Flushable {
final void registerPromise(String a1, String a2, String a3, String a4) {
synchronized (lock()) {
+ boolean wasEmpty = microTasks.isEmpty();
microTasks.add(() -> {
javapromise(a1, a2, a3, a4);
});
- if (topMostCall() == null) {
+ if (wasEmpty && !synchronous) {
dispatch(this::flushImpl);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists