Using TSynLog with a lot of threads? PYou should better upgrade your source
We identified and fixed today several issues which may affect applications
creating a lot of threads (i.e. not using a thread pool).
The symptom was an unexpected access violation, when you reach a multiple of 256 threads count.
You should better upgrade to at least revision 1.18.1351 if your
application creates a lot of custom threads.
Note that a regular mORMot server, using
http.sys and its
thread pool won't be affected by this issue.
We also refactored the whole threading process in
- The thread numbers in the
.logfile would be re-used;
- The memory resources associated with each thread would be released and re-used;
- It would handle an infinite number of thread creation (previous implementation did have a hard limit of 32,768 created threads during a process lifetime);
- Exception would never be intercepted during logging process;
- Made code stronger, and re-entrant in case of concurrent
TSynLogclasses in the same process;
- Of course, this works also under Linux, via FPC or (Cross)Kylix.
See our Source Code Repository TimeLine.
Feedback is welcome on our forum, as usual!