Don’t use the TPL as it still has rough edges in unsuspected places
Posted by jpluimers on 2020/08/20
A few posts on why not to use the TPL and be very careful with regular RTL threading code:
- [WayBack] Ondrej Kelle – Google+
- [WayBack] TThreadQueue one of the two generic thread safe classes is broken. RSP-18521 states that it got fixed in Tokyo release, but *is not*. See in https://qua… – Kiriakos Vlahos – Google+
- [WayBack] delphi – Strange behaviour of TParallel.For default ThreadPool – Stack Overflow
- [WayBack] multithreading – How can I use TTask.WaitForAny from the new threading library? – Stack Overflow
In my opinion, threading code needs to be written and maintained by people that live and breath multi-threading. Over the years, RTL and TPL have not lived up to that, but a library like [WayBack] OmniThreadLibrary has.
If you still insist on the TPL, or want to break it, start with these posts: [WayBack] Parallel Programming Archives • Stephen Ball’s Technical Blog
–jeroen






lhengen said
While I don’t disagree that using the TPL is a caveat emptor affair when compared to OTL, you are citing articles (like Stephen Ball’s blog) that are 6 years old. Who cares what WayBack links to issues you can find are. What matters is the current state of the PPL. No point in flogging a dead horse…