[Issue 16298] New: [ER] lazily register standard codecs from std.encoding
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Jul 19 11:07:53 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16298
Issue ID: 16298
Summary: [ER] lazily register standard codecs from std.encoding
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: ketmar at ketmar.no-ip.org
Created attachment 1604
--> https://issues.dlang.org/attachment.cgi?id=1604&action=edit
lazily registers standard codecs
the attached patch seems to work ok with my system. it registers standard
codecs when on first call to `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.
this patch solves issue 16291 for the time being, until the proper fix for
cycle detection in module ctors isn't complete.
--
More information about the Digitalmars-d-bugs
mailing list