Thread overview | ||||||
---|---|---|---|---|---|---|
|
September 08, 2003 rehash unstability - data.txt | ||||
---|---|---|---|---|
| ||||
Attachments: | import stream; void main() { int[char[]] esdom; File f = new File("data.txt"); while(!f.eof()) esdom[f.readLine()] = 0; f.close(); esdom.rehash; } DMD 0.71 With the attached data.txt file, rehash never ends (or takes a looong time). If you remove/change the last line of data.txt, rehash does its stuff in a blink. |
September 08, 2003 Re: rehash unstability - data.txt | ||||
---|---|---|---|---|
| ||||
Posted in reply to kw | Is this on linux ? I had a bug that when reading in a file using eof(), if the file did not end in a new line it would seg fault, or just hang forever. Charles "kw" <kw_member@pathlink.com> wrote in message news:bjid97$169c$1@digitaldaemon.com... > import stream; > > void main() > { > int[char[]] esdom; > File f = new File("data.txt"); > > while(!f.eof()) esdom[f.readLine()] = 0; > f.close(); > esdom.rehash; > } > > DMD 0.71 > With the attached data.txt file, rehash never ends (or takes a looong time). If > you remove/change the last line of data.txt, rehash does its stuff in a blink. > > > |
September 08, 2003 Re: rehash unstability - data.txt | ||||
---|---|---|---|---|
| ||||
Posted in reply to Charles Sanders | In article <bjikil$1h4t$1@digitaldaemon.com>, Charles Sanders says... > >Is this on linux ? I had a bug that when reading in a file using eof(), if the file did not end in a new line it would seg fault, or just hang forever. No, Windows. It also can be reproduced without using files. |
Copyright © 1999-2021 by the D Language Foundation