D - rehash unstability - data.txt
- kw <kw_member pathlink.com> Sep 08 2003
- "Charles Sanders" <sanders-consulting comcast.net> Sep 08 2003
- kw <kw_member pathlink.com> Sep 08 2003
- "Walter" <walter digitalmars.com> Sep 13 2003
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.
Sep 08 2003
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
you remove/change the last line of data.txt, rehash does its stuff in a
Sep 08 2003
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.
Sep 08 2003









kw <kw_member pathlink.com> 