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.

  • Download File Path

    Support
    0 Votes
    3 Posts
    680 Views
  • 0 Votes
    3 Posts
    556 Views
  • 0 Votes
    3 Posts
    541 Views
  • Action at the end of the script

    Support
    0 Votes
    11 Posts
    1020 Views
  • 1 Votes
    4 Posts
    1695 Views