Skip to content

Instantly share code, notes, and snippets.

@whoiscarlo
Created September 23, 2014 19:00
Show Gist options
  • Save whoiscarlo/52e80c9e50326a72da95 to your computer and use it in GitHub Desktop.
Save whoiscarlo/52e80c9e50326a72da95 to your computer and use it in GitHub Desktop.
How to run Multi Thread in Maxscript, although, currently it locks up the viewport =(
fn bkgWrkr =
( python.execute("
import thread;
import time;
def crap():
for i in range( 10):
print 'Love', i
print time.strftime( '%c')
time.sleep( 5)
print 'Done'
crap()
")
)
MainThread = dotnetobject "CSharpUtilities.SynchronizingBackgroundWorker"
dotNet.addEventHandler MainThread "DoWork" bkgWrkr
MainThread.RunWorkerAsync()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment