collinsmith / riiablo

Diablo II remade using Java and LibGDX
http://riiablo.com
Apache License 2.0
895 stars 101 forks source link

Replace thread-unsafe object pools with thread-safe object pools #117

Open collinsmith opened 4 years ago

collinsmith commented 4 years ago

63c17b0e172f83cdc1f6e95ea5a206b97726ff37 added com.riiablo.util.Pool thread safe object pool implementation. It's worth it to go over com.badlogic.gdx.utils.Pool references and find usages that would benefit from a thread safe object pool. While not necessarily an outright bug, some implementations may produce errors if the throughput is high enough (this only occurred when doing an excessive amount of logging ops/sec), so I'm marking this as such to indicate that is important to look at for packages like com.riiablo.io, com.riiablo.mpq, com.riiablo.codec (all packages that may be hit a ton by multiple threads).