mirror of
https://github.com/processing/processing4.git
synced 2026-01-30 03:41:15 +01:00
replace return with if
This commit is contained in:
@@ -176,14 +176,15 @@ public class PreprocService {
|
||||
* Indicate to this service that the sketch code has changed.
|
||||
*/
|
||||
public void notifySketchChanged() {
|
||||
if (!enabled) return;
|
||||
synchronized (requestLock) {
|
||||
if (preprocessingTask.isDone()) {
|
||||
preprocessingTask = new CompletableFuture<>();
|
||||
// Register callback which executes all listeners
|
||||
whenDone(this::fireListeners);
|
||||
if (enabled) {
|
||||
synchronized (requestLock) {
|
||||
if (preprocessingTask.isDone()) {
|
||||
preprocessingTask = new CompletableFuture<>();
|
||||
// Register callback which executes all listeners
|
||||
whenDone(this::fireListeners);
|
||||
}
|
||||
requestQueue.offer(Boolean.TRUE);
|
||||
}
|
||||
requestQueue.offer(Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user