You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Allay is designed to be multi-thread between different worlds, it may be normal for plugin developers who are lack for multi-thread programming knowledges access not thread-safe methods in wrong threads unexpectedly. We need a mechanism to ensure plugin developers calling these methods correctly (in right thread), and throw exception when the caller is not in correct thread.
Solution
This proposal proposes an idea. To be detailed, we put check to these methods, and when they are called, the checker will check if the caller is in correct thread. This solution is similar to what Spigot/Paper did.
However, adding these checks may result in performance reduction. Maybe we can find a better solution.
The text was updated successfully, but these errors were encountered:
Problem
Since Allay is designed to be multi-thread between different worlds, it may be normal for plugin developers who are lack for multi-thread programming knowledges access not thread-safe methods in wrong threads unexpectedly. We need a mechanism to ensure plugin developers calling these methods correctly (in right thread), and throw exception when the caller is not in correct thread.
Solution
This proposal proposes an idea. To be detailed, we put check to these methods, and when they are called, the checker will check if the caller is in correct thread. This solution is similar to what Spigot/Paper did.
However, adding these checks may result in performance reduction. Maybe we can find a better solution.
The text was updated successfully, but these errors were encountered: