[fpc-pascal] Are the TEncoding singletons thread-safe?
silvioprog at gmail.com
Thu Aug 11 15:17:30 CEST 2016
On Thu, Aug 11, 2016 at 5:02 AM, Jonas Maebe <jonas.maebe at elis.ugent.be>
> Bart wrote:
> > On 8/11/16, silvioprog <silvioprog at gmail.com> wrote:
> >> ... so I decided to research how Delphi
> >> implements it, because I can't get any error on it, and I've seen it
> >> implements a "lock-free initialization" technique
> >> <http://stackoverflow.com/a/24657705/3268398> using the XE's
> >> AtomicCmpExchange() function before return any TEncoding global
> > ......
> >> I could send a patch to solve it,
> > I hope you did not look at the Delphi sourcecode to see how it was
> > implemented, because that would now make a "clean room" implementation
> > on our side almost impossible.
> It would make a clean room implementation by Silvio himself impossible,
> but anyone that reads his description and writes code based on that
> description is still clean (as long as they did not also look at the
> Delphi source code).
I've opened a new issue sending a possible patch: http://bugs.freepascal.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal