Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

实体初始化改进 #17

Open
SuperIceCN opened this issue Jul 3, 2023 · 0 comments
Open

实体初始化改进 #17

SuperIceCN opened this issue Jul 3, 2023 · 0 comments

Comments

@SuperIceCN
Copy link
Member

❇ 特性请求

目前,PNX中的实体由private volatile boolean initialized;标记是否完成初始化,这无法被外部访问,会导致超高并发条件下的访问错误(访问未完成初始化的实体的字段或方法)。

可以将此字段更改为一个三态(未初始化,初始化中,初始化完毕)枚举并用getter将其暴露给调用者以避免上述情况。

@CoolLoong CoolLoong transferred this issue from PowerNukkitX/PowerNukkitX Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant