[Issue 16291] phobosinit fails to register encodings on individual tests

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Jul 19 10:46:33 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16291

--- Comment #10 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
Created attachment 1603
  --> https://issues.dlang.org/attachment.cgi?id=1603&action=edit
lazy standard codec registration

the attached patch seems to work ok with my system. it registers standard
codecs when user is first trying to use `EncodingScheme.create()`, and it also
exposes `EncodingScheme.registerStandardCodecs()` function, which can be called
to manually register standard codecs if it is necessary in some other module
ctor.

it is safe to call `EncodingScheme.registerStandardCodecs()` multiple times,
and from multiple threads.

--


More information about the Digitalmars-d-bugs mailing list