> You might also want to replace those 'pass' statements when smartqueue > is empty or full with time.sleep() to avoid busy waiting. It won't do busy waiting, because read_str and write_str are using select.select and they will block without using CPU time, until data becomes available to read/write.