scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

XMLEventReader.stop does not stop parser thread #3881

Closed scabug closed 9 years ago

scabug commented 14 years ago

This minor annoyance was reported a while back on the scala-user mailing list (http://scala-programming-language.1934581.n4.nabble.com/XMLEventReader-and-large-XML-file-tp1956916p1956916.html).

XMLEventReader provides a stop method which is supposed to stop the parser thread, but that currently does not work.

scabug commented 14 years ago

Imported From: https://issues.scala-lang.org/browse/SI-3881?orig=1 Reporter: huynhjl See #4267 Attachments:

scabug commented 14 years ago

huynhjl said: Example that shows that XMLEventReader.stop does not stop the parser thread.

scabug commented 14 years ago

huynhjl said: Proposed patch causing the parser thread to sleep on XMLEventReader.stop (otherwise the parser thread does not currently sleep so interrupt is a no-op)

scabug commented 14 years ago

@paulp said: (In r23251) Fixing issue with XMLEventReader.stop failing to stop the parser thread. Contributed by Jean-Laurent Huynh, reviewed by extempore. Closes #3881.

scabug commented 14 years ago

@paulp said: I reverted the patch because it hangs on windows.

scabug commented 14 years ago

huynhjl said: Patch take 2 - because produce(POISON) will block when queue is full

scabug commented 14 years ago

huynhjl said: I found out why it can sometimes hang. produce(POISON) blocks if the queue is full. I guess there may have been two separate reasons why XMLEventReader.stop() did not stop...

scabug commented 9 years ago

@SethTisue said: The scala-xml library is now community-maintained. Issues with it are now tracked at https://github.com/scala/scala-xml/issues instead of here in the Scala JIRA.

Interested community members: if you consider this issue significant, feel free to open a new issue for it on GitHub, with links in both directions.

SethTisue commented 3 years ago

note that XMLEventReader was deprecated and has now been removed from the scala-xml library