|
![](/i/fill.gif) |
On Tue, 25 May 1999 20:37:49 +0200 (CDT), Jan Danielsson wrote:
>[...]
>>Okay, now let's stop ignoring how hard a multithreaded design is.
>
>Are you talking about 'multithreading in general', or 'rewriting povray'?
I'm talking about rewriting povray.
>>Can I ask all of you "we need SMP so we need threads" people what's wrong
>>with plain ol' fork?
>
>And I ask; what's wrong with threads? (Now ask me what's wrong with forks; We
>could do this until the sun explodes :-)
"What's wrong with forks?" I asked you first. :)
No, really, the main problem with threads is that POV has a lot of global
variables that are changed during a render. If you can locate all of them
and make them threadsafe, then you'll be fine. I did some of this when I
wrote my motion-blur hack, but there are a lot more that didn't affect me
but would affect an attempt at multithreading.
I have nothing against threads in general; I love the flexibility they give
me (along with asynchronous I/O.) I just think a forking model would be
easier to implement given what we have to work with, because it copies all
of the variables into another process space for the other processor.
Oh, and sorry if I appeared to imply that you were a Windows programmer. I
was just trying to defuse the most likely response to my question, not
necessarily from you.
Post a reply to this message
|
![](/i/fill.gif) |