wiki:KernelTask

Version 2 (modified by art, 17 years ago) (diff)

--

Manual

How to use Kernel/Task? subsystem

Most of the games has got a main-loop. During the execution of one cycle of the loop a game engine has to perfrom a lot of tasks, e.g. checking user input, rendering, physic update and so on.
nrEngine's Kernel/Task? subsystems provides a simple but powerfull interface to manage the main loop. The engine does contains a Kernel which runs in the background of the engine. A Task can be bound to the kernel, so that it gets updated every cycle. A task can be any user derived class which has to perform repetitive jobs, e.g. check for user input or stream data from the disk.
Moreover a task can get a specific order number or it can depend on another task. Hence the engine does provide a simple graph based task execution system. The functionality of the nrEngine's kernel is similar to the operating system's one, but in a very simple form.
And finally a task can be shifted to a thread, so that it executes in parallel to the main application.

The following code show you how to use the engine's kernel subsystem for a simple managment of tasks in your application/game:

Error: Failed to load processor text/c++
No macro or processor named 'text/c++' found

See also: ManualPage