[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Context switching woes

Jarda Benkovsky wrote:

> But this will increase either load or latency or both :(. I would prefer
> the scheduling thread be woken up by releasing it's mutex by the thread
> just going to sleep. I need cooperative context multitasking. If you
> need, I can elaborate more

Look at SGI State Threads (http://oss.sgi.com/projects/state-threads/)
or to GNU Pth (http://www.gnu.org/software/pth/) for cooperative
multithreading libraries.

State Threads looks like they are more I/O-based than GNU Pth, but I
think that they are portable to Win32 (GNU Pth isn't).

Note that if you think about a problem carefully, it is very often based
on I/O. A game is usually driven by time, input and network, all of
which are input that select/poll can work with.

"The use of COBOL cripples the mind; its teaching should, therefore, be
regarded as a criminal offence." -- Edsger W. Dijkstra

To unsubscribe, e-mail: linuxgames-unsubscribe@sunsite.dk
For additional commands, e-mail: linuxgames-help@sunsite.dk