-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
java functions can work but with caveats #1558
- Loading branch information
Showing
4 changed files
with
24 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,12 +42,14 @@ public JsExecutable(Value value) { | |
this.value = value; | ||
} | ||
|
||
private static final Object LOCK = new Object(); | ||
|
||
@Override | ||
public Object execute(Value... arguments) { | ||
if (logger.isTraceEnabled()) { | ||
logger.trace("begin execute: {}", value); | ||
synchronized (LOCK) { | ||
logger.warn("[*** execute ***] global lock on java function possibly from callonce / callSingle: {}", value); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ptrthomas
Author
Member
|
||
return value.execute(arguments); | ||
} | ||
return value.execute(arguments); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I think the warning is misleading. It won't be from call once at all times, it could just come from a normal call method. My second question is whether the LOCK is truly needed here (I still think here the best name for this class is
HostExecutable
)