Python Forum
Queuing the file content and run the thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Queuing the file content and run the thread.
#6
I'm no expert on threading, but I'm fairly certain that at least one problem is that you need to join on the queue after starting the threads.

Another, more minor issue that probably isn't causing issues, is that f.close() should be inside your while-loop.

I don't have a chance at the moment, but I'll play with this code when I get a chance.
Reply


Messages In This Thread
RE: Queuing the file content and run the thread. - by micseydel - Jan-19-2017, 06:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Queuing Theory in Python NOLA_Saints 0 844 Feb-22-2023, 11:42 PM
Last Post: NOLA_Saints
  Extracting Specific Lines from text file based on content. jokerfmj 8 3,253 Mar-28-2022, 03:38 PM
Last Post: snippsat
Thumbs Up Parsing a YAML file without changing the string content..?, Flask - solved. SpongeB0B 2 2,380 Aug-05-2021, 08:02 AM
Last Post: SpongeB0B
  Opening file and outputting its text content example leodavinci1990 1 1,953 Oct-12-2020, 05:33 AM
Last Post: buran
  how to view file content of .docx while in Recycling bin NeoPy1 0 1,469 Sep-16-2020, 10:11 PM
Last Post: NeoPy1
  copy content of text file with three delimiter into excel sheet vinaykumar 0 2,440 Jul-12-2020, 01:27 PM
Last Post: vinaykumar
  Read content of GitHub file sridhar 5 10,289 Apr-29-2020, 11:49 PM
Last Post: sridhar
  Error SQLite objects created in a thread can only be used in that same thread. binhduonggttn 3 15,889 Jan-31-2020, 11:08 AM
Last Post: DeaD_EyE
  How do I read the HTML files in a directory and write the content into a CSV file? glittergirl 1 2,677 Sep-23-2019, 11:01 AM
Last Post: Larz60+
  save content of table into file atlass218 10 10,272 Aug-28-2019, 12:12 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020