How do I delete a line from a file after use in a for loop, but the thread doesn't end?

Support
  • I'm trying to use lines from a file which should change after each run, but it seems like the built in functionality for this only works if the thread ends and doesn't work when I use it in a for loop. I fixed this issue by loading the file into a list then using the first element of the list as a variable and then deleting that variable after using it for something. The problem with this is that when using more than 1 thread, since the lines aren't actually deleted from the thread and it's just parts of the list being deleted, the program is returning like 4 or 5 of the same outputs. tldr: How do I delete a line from a file after using it(in a for-loop, and without the thread ending)?

  • Bumping

  • @T9 did you find the answer? did you solve it?

  • For multithreading you should use resources. There are additional
    settings for each resource, just double click it inside resources pane.
    There you can fine tune your settings to achieve desirable behavior.

    In your case you should set resource to use each line only once,
    and set max symultanious usages to 1. Check other settiings too
    to make it work the way you want.

  • Threads communication

    Support
    0 Votes
    2 Posts
    475 Views
  • 0 Votes
    4 Posts
    693 Views
  • 0 Votes
    1 Posts
    627 Views
  • Running few threads at a time

    Support
    0 Votes
    3 Posts
    755 Views
  • Download file problem

    Support
    0 Votes
    11 Posts
    4002 Views