Grasshopper

algorithmic modeling for Rhino

Is multi-threading even possible in Grasshopper?

 

Views: 2518

Replies to This Discussion

None of the Rhino SDKs are threadsafe, so there really isn't any use in trying multithread them as you'll just run into a ton of issues.  That's not to say that you can't multithread certain operations, but its going to have to be something that doesn't rely on the RhinoSDKs.  The only plugin that I know that is multithreaded (other then rendering engines) is RhinoTerrain and the component of the software that is dealing with all the threads is separate from Rhino.  Coding something like this is also far beyond a scripting component and probably something that would be best handled within a custom component.

Not entirely true. Most of the geometry operations are threadsafe. Just don't start messing with the RhinoDoc while in threads.

 

I've been working on multithreaded python scripts lately and may have something to show in the near future.

Well, that's certainly a change in things from almost every other time I've asked.  It would be expected that all of the Doc ops would require a single thread, but most of the time its the geometry manipulation that's the issue.  Definitely looking forward to anything you've got to show.
Awesome...
Just what I was looking for.  THX.

also you may want to check out the Parallel library in .net 3.5 or 4.0. they allow you to do simple for and foreach loops without the need for thread managment.

 

the part i find difficult is making everything synchronous  because current easy methods for multi threading are not. meaning that that the result will be out of order which for a lot of things it is important to maintain order.

 

Here's a python sample that uses the Parallel library that Robert mentioned.

http://python.rhino3d.com/entries/607-Multithreaded-Python

You're going to want to have at least the May 31st, 2011 WIP of Rhino 5 to test.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service