[IronPython] Importing on another Thread

Michael Foord fuzzyman at voidspace.org.uk
Wed Jul 2 11:51:11 CEST 2008


Dan Eloff wrote:
> I actually haven't managed to successfully import any modules in a new
> thread, shouldn't this be possible in IronPython (2.0b3) Silverlight
> B2
>
> All modules loaded in 2.95s
> Background imported  []
> Could not (background) import  ['hmac', 'hashlib', 'urlparse', 'new',
> 'ConfigParser', 'cgi', 'heapq', 'copy', 'dis']
>
>   

Does it work if you do the imports normally?

> I started the thread like so:
>
> t = Thread(ThreadStart(preload))
> t.Start()
>
> And I used __import__ to load the modules.
>
>   
Out of interest, why?

Michael

> Thanks,
> -Dan
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>   


-- 
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/
http://www.trypython.org/
http://www.ironpython.info/
http://www.resolverhacks.net/
http://www.theotherdelia.co.uk/




More information about the Ironpython-users mailing list