Seems like using a LoggerHandle directly on a job is not good if there’s several jobs writing to the same LoggerHandle. I get errors
“System.Exception: ThreadLoggerHandle overrides a valid LoggerHandle, this usually means you forgot to reset it or you have a race condition.”.
I need to print stuff from a Job that checks some errors and the output is basically that. All job parameters are ReadOnly.
Found this older post.
“I made some multithreading tests using 4 bursted jobs/threads using the same logger handler, writing to the same file. Then a small amount of log entries did NOT find their way into the log file. So it is NOT thread-safe and the only safety is to use separate logger handles for each parallel job writing in a separate log file.”
There’s 10 jobs running in parallel. In Sequential IT WORKS.
But suddenly my game stalls to a point that I have to close Unity. Doesn’t matter if it’s executed once, it gets stuck.