As a short answer, only one process at a time can write to Tk at a time. You have two. in other words, you must make sure that only one process does the GUI stuff, and the other does only work and no GUI stuff. For a longer explanation, take a look here
372499