Googles appar
Huvudmeny

Post a Comment On: cbloom rants

"03-06-12 - Oodle Handle Table - WFMO"

3 Comments -

1 – 3 of 3
Blogger Tom Johnstone said...

Can you poll a handle? eg. IsDone(A)

In our job system we have a WFMO(ArrayOfHandles, NumHandles, bWaitForAll)

I know I'm just kicking semantics around here!

March 7, 2012 at 7:31 AM

Blogger cbloom said...

Sure, of course. In fact "IsDone" requires only one "load acquire" - on x86 it's not even an atomic op. (*)

(* = actually there's a subtle case that requires a #StoreLoad just for IsDone status checking; you don't need to be concerned about that internally, but I use internally for WFMO checks :

http://cbloomrants.blogspot.com/2011/11/11-28-11-some-lock-free-rambling.html
)

Oddly I haven't actually implemented the "wait for any" type of WFMO yet because I haven't found any case where I want it.

March 7, 2012 at 8:40 AM

Blogger Tom Johnstone said...

Well in our case, we have a fixed pool of job handles and no mechanism which automatically recycles those handles without calling 'wait', so "wait for any" is a nice way of recycling handles. Obviously you try and keep your array of handles in order of likely to finish soonest to latest.

March 7, 2012 at 10:29 AM

You can use some HTML tags, such as <b>, <i>, <a>

This blog does not allow anonymous comments.

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.