-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
_group.GetEntities().AsParallel().ForAll(Execute);这段语句有GC #1077
Comments
From Google Translate:
@32haojiufangjia yes, please try _group.AsEnumerable().AsParallel().ForAll(Execute); |
Fyi, when doing things in parallel, please avoid using generated methods like entity.AddXyz(), entity.ReplaceXyz(), entity.RemoveXyz(), etc, since they result in modifying non-concurrent collections like HashSets, etc. When doing things in parallel I recommend changing the component values directly, e.g. entity.health.value -= 1; |
先生,你好,我在测试中发现这段语句有GC,请问有办法解决吗
The text was updated successfully, but these errors were encountered: