Closed scabug closed 9 years ago
Imported From: https://issues.scala-lang.org/browse/SI-3881?orig=1 Reporter: huynhjl See #4267 Attachments:
huynhjl said: Example that shows that XMLEventReader.stop does not stop the parser thread.
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)
@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.
@paulp said: I reverted the patch because it hangs on windows.
huynhjl said: Patch take 2 - because produce(POISON) will block when queue is full
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...
@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.
note that XMLEventReader
was deprecated and has now been removed from the scala-xml library
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.