DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26828>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26828

CSVRead function works fine for only one thread (20040209 build)





------- Additional Comments From [EMAIL PROTECTED]  2004-02-11 22:16 -------
There were some bugs in the CSVRead code in 1.9.1, which meant that it did not 
always behave correctly for multiple threads. 

Unfortunately, it looks like your code was relying on undocumented (and 
incorrect, in my view) behaviour.

AFAIK, the intention was always to make CSVRead return different rows for 
different threads. Two threads will only get the same row if there are more 
threads than lines in the file, in which case it wraps round to the beginning 
of the file again.

This implies that the second thread to access the same file will always 
retrieve the second row, and so on. This must apply whether or not the call to 
next() has yet been (or will ever be) made, as a thread that fetches one or 
more columns before calling next() might be interspersed with another thread 
that does the same.

I can't see how to create the behaviour you require without breaking 
the "normal" behaviour, but if you can supply the code (or just the algorithm) 
I'm happy to apply it.

I'm sorry, but it seems to me that you are using CSVRead in a way for which it 
was not designed. 
It just happened to work in 1.9.1 due to a feature of the implementation.

Alternatives are:
- put the comments in a separate file, and use a one-line file
- use properties instead
- code a new function or test element to do what you want.

If you already have the config files set up, perhaps you could just pre-
process them to create the one-line version just before starting the test.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to