Viewing posts tagged write
A common problem when we use threads on python is the concurrency of instances on I/O objects or print screen cases, in this case, I show a thread in parallel, to write outputs from other threads instances to a file, sharing a variable called "work_queue", in this code is a list data type, but you can use others like queues from Queue library, using a flag to break the writer thread and give it a last chance to get into While sentence and check for last time the "work_queue" list.