|
From: SourceForge.net <no...@so...> - 2004-02-23 21:22:47
|
Bugs item #902992, was opened at 2004-02-23 21:12 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=442052&aid=902992&group_id=45158 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Dair Grant (grantd) Assigned to: Nobody/Anonymous (nobody) Summary: Make API re-entrant for multithreading Initial Comment: Discussion on the list about making the API re-entrant - logging here as a feature request. -dair ***** James Dessart wrote: Is there a list somewhere of what Quesa functions are, or are not, reentrant? It'd be nice to be able to push some of the more compute-bound functions out into multi-processor threads on the Mac OS, in our application. ***** Dair Grant wrote: At present nothing is officially re-entrant - there aren't any locks whatsoever. In practice you would probably find that the math routines are probably safe, although even they should really have some protection in their glue around the global error state (or make the error state thread specific). Doing a first pass on thread safety (i.e., one global lock which was acquired/released by every entry point) would be fairly easy since it could be munged into the glue code. Allowing multiple threads inside Quesa at once would be more complex, although you could probably get most of the way there by having per-object locks since most routines pass the object they're working on around. There is only bit of global data, so protecting that+the objects the current thread is working on would probably be enough (assuming a thread safe C library/OpenGL). I suppose it depends on what the performance gains of doing that wold be vs the complexity of the extra locks. My guess is it'd only really be worth it for things like the math routines, where you might want to dump transforming an array of vertices off to another thread? ***** James Dessart wrote: It's pretty much just the math routines, and perhaps setting TriMesh data. Essentially, playing around with coordinates and such, without any rendering. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=442052&aid=902992&group_id=45158 |