[Issue 9661] New: LockingTextWriter should increment file handle reference count

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 7 08:44:26 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9661

           Summary: LockingTextWriter should increment file handle
                    reference count
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: lomereiter at gmail.com


--- Comment #0 from Artem Tarasov <lomereiter at gmail.com> 2013-03-07 08:44:25 PST ---
Its behaviour is inconsistent with byLine() and byChunk() - which keep File
struct internally instead of FILE* pointer.

Compare:

auto lines = File("/tmp/file.txt").byLine();
writeln(lines); // works

auto writer = File("/tmp/file.txt", "w+").lockingTextWriter;
writer.put("123"); // fails - the file is already closed!

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list