Jump to content
  • Advertisement
Sign in to follow this  

Task based threading terminology confusion.

This topic is 2042 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all,
Lately I've been reading about task-based threading where a subsystem registers tasks at a task-manager and worker-threads of the task-manager execute these items.
But I'm a bit confused about terminology since different resources seem to use different terms.
What is the definition of a Task?
- Is it something the program/programmer wants to be computed
- Is it a subsystem that takes workitems, does computing for those workitems and store the result somewhere
- Is it a simple function?
What is a Job (or is this unrelated to task-based threading)?
Does one register only a task and a set of workitems in one call, or does one create a task and later add workitems for that task?
Thanks a lot for any help.

Share this post

Link to post
Share on other sites
Guest Hiwas

Threading terminology can be a mixed bag of cats, it gets pretty crazy sometimes.  In general though, task and job are equivalent and their definition can range from a simple functor to possibly a full blown base class with helpers for tracking, priorities etc.  Normally though, a task is a function you want to be executed, it's that simple.  You just want it executed asynchronously somewhere else so you can keep on doing other things.


In games, you usually end up with both bulk insertions of tasks and quite often single insertions.  For example, in my system, I tend to register work items in bulk most of the time.  So for instance, if I have object update functions, I simply insert all of them in a single shot.  Of course, I may also add a cleanup task as a single item right after that.  I.e. distribute all these little object update functions, when done call this "post" work function to clean up/gather results, do whatever.  In a way it turns my primary thread into a conductor, it tells the system what to be done, sometimes inserts barriers (the post task work items) so it can synchronize and know when to swap buffers etc.  It is a pretty large discussion but this hopefully gives you a start.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!