Work Queue System in Urho3D

General discussion around Urho3D.

Work Queue System in Urho3D

PostPosted by codder » 30 Dec 2016, 18:57

Hello,

Can somebody explain me how work queue is working in Urho3D and where is used internally?
How it differs from other multi-threaded task scheduler systems?

Thanks
User avatar
codder
Have some posts
Have some posts
 
Posts: 44
Joined: 11 Aug 2015, 22:39

Re: Work Queue System in Urho3D

PostPosted by Eugene » 30 Dec 2016, 22:23

codder wrote:Hello,

Can somebody explain me how work queue is working in Urho3D and where is used internally?
How it differs from other multi-threaded task scheduler systems?

Thanks

Task that is consumed by Work Queue goes into threads and get completed at some point (or wait for completing in main thread, if no working threads)
I don't know how other task scheduler systems works so I can't explain the difference.
Work Queue is internally used (only?) within rendering systems.
User avatar
Eugene
Some active
Some active
 
Posts: 62
Joined: 06 Jun 2016, 06:30
Location: Russia

Re: Work Queue System in Urho3D

PostPosted by codder » 31 Dec 2016, 11:26

Why is not used by the physics subsystem? Background resource loading is using a dedicated thread or is consumed by the work queue?
I'm trying to understand better how the multi-threading system is working in Urho3D.
User avatar
codder
Have some posts
Have some posts
 
Posts: 44
Joined: 11 Aug 2015, 22:39

Re: Work Queue System in Urho3D

PostPosted by cadaver » 31 Dec 2016, 12:42

Physics ties into fixed step scene updates and scripts, so it cannot be easily put into a thread without incurring concurrency or locking problems. Basically, while physics calculates, you don't have sensible other things to do, if you also want to run scene logic in lockstep with physics updates.

Resource background loading uses its own thread. It *could* use the work queue, but it was potentially simpler to do as a own thread, it sleeps most of the time anyway. So far Urho itself only uses the work queue for short-lived tasks on the same frame, like spreading culling or light processing to many cores when preparing the rendering view.
User avatar
cadaver
Urho3D author
Urho3D author
 
Posts: 1802
Joined: 16 Jan 2014, 14:52
Location: Finland


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron