[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Long-lived Guile scripts in a mono-threaded game engine
From: |
Sylvain Beucler |
Subject: |
Re: Long-lived Guile scripts in a mono-threaded game engine |
Date: |
Tue, 27 May 2008 21:57:07 +0200 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
Hi,
Thanks for your answers Ludovic and Clinton.
> An alternative approach could use a thread per script.
By the way, I have a question about threads: is there a way to kill a
running thread? For example when the current game screen changes, all
current scripts are terminated. Or does this need to be implemented
manually?
> > Yeah, I was trying to avoid introducing threads in the engine :)
> > But it sounds like the only usable solution as of now.
>
> It's actually not silly now that we've entered the multicore era.
That's a pro, but there are cons too :/
- this kind of game engine has hardly anything runnable in parallel
- all the game globals need to be properly mutex'd
- or threads executions need to be serialized which defeats the point
Another pro though is that all of us masochists love debugging
multithread programs ;)
I'll try these solutions with my toy project and see how they fair
with performances/complexity :)
Thanks,
--
Sylvain