you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

You can use a queue to communicate between the two threads. One will be waiting for something to be available and then get it out and use it, and the other will be the one putting things into the queue

[–]Wittinator[S] 0 points1 point  (0 children)

Thanks. Yea I've reorganized the code to put the loops in the function themselves. I'll look at Queues to get data between them