Skip to content

Instantly share code, notes, and snippets.

@workingenius
Created July 27, 2020 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save workingenius/1a4df7f9ae8f366447f2c6138630c99b to your computer and use it in GitHub Desktop.
Save workingenius/1a4df7f9ae8f366447f2c6138630c99b to your computer and use it in GitHub Desktop.
import thread
def thread_func(cls):
a = cls()
# do something with a ....
def work():
class DefineClass:
pass
print id(DefineClass)
thread.start_new_thread(thread_func, (DefineClass, ))
for i in range(100):
work()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment