at this pointwe can print the temperature that was stored on each thread object notice once again that we can access data that was constructed within the thread from the main thread in threadsall state is shared by default executing this code on my mbit connection takes about two tenths of secondit is degc in edmonton it is degc in victoria it is degc in winnipeg it is - degc in fredericton it is - degc in st john' it is - degc in halifax it is - degc in toronto it is - degc in charlottetown it is - degc in quebec city it is degc in regina got temps in seconds if we run this code in single thread (by changing the start(call to run(and commenting out the join(call)it takes closer to seconds because each second request has to complete before the next one begins this speedup of times shows just how useful concurrent programming can be the many problems with threads threads can be usefulespecially in other programming languagesbut modern python programmers tend to avoid them for several reasons as we'll seethere are other ways to do concurrent programming that are receiving more attention from the python developers let' discuss some of these pitfalls before moving on to more salient topics shared memory the main problem with threads is also their primary advantage threads have access to all the memory and thus all the variables in the program this can too easily cause inconsistencies in the program state have you ever encountered room where single light has two switches and two different people turn them on at the same timeeach person (threadexpects their action to turn the lamp ( variableonbut the resulting value (the lamp is offis inconsistent with those expectations now imagine if those two threads were transferring funds between bank accounts or managing the cruise control in vehicle