Improve Logger pool synchronization
Closed this issue · 0 comments
collinsmith commented
When writing thousands of log messages per second, LibGDX Pool#obtain()
is returning null
. I think this is due to a synchronization issue on the underlying collection (which is not synchronized). Temporary workaround has been to override #obtain()
and loop until non-null reference is returned, and while this works there is technically the possibility of having #obtain()
return the same reference for different log messages. Not a critical issue as this is only occurring so far in MPQ
when outputting all table entries (16K). Suggested fix is to write a synchronized collection to support pooling.