Jeff's picture

ComputeCommandQueue.Wait(...) documentation is wrong

Category:bug report

The documentation (probably cut-n-paste from elsewhere) says "If events is not null a new event identifying this command is attached to the end of the list." Isn't that incorrect? Wait just waits for the specified events to complete.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nythrix's picture


Status:open» by design

CommandQueue.Wait translates to clEnqueueWaitForEvents. As you see the documentation matches the Khronos pages so there's nothing fundamentally wrong with it. This is not a blocking function. It merely gives you a "wait" event on a given command queue.
However, I have to say that the purpose of this function isn't very clear to me. I haven't been able to think of a useful scenario for it.

I believe you're probably after one of these:


Edit: Ok, the only thing I could think of is synchronizing several command queues using these "waits" without you having to block your application or building a very long event list. It still remains a weak selling point, though.

Jeff's picture


Title:ComputeCommandQueue.Wait(...) documentation is wrong» ComputeCommandQueue.Wait(...) doesn't append a new event to the list.
Component:Documentation» Code
Status:by design» open

Okay, in that case the docs are right but it doesn't work.

Because after calling it, I still have 1 event in my list.

You're right though, I was actually looking for .Finish().

nythrix's picture


Component:Code» Documentation
Status:open» confirmed

Sorry, I've been messing around again. clEnqueueWaitForEvents()/CommandQueue.Wait() isn't supposed to create a new event/append it to the list. Never mind my previous post, you were actually right, the docs should be fixed.

Interestingly, the very same bug you mentioned was affecting the function next door. Funny that!

nythrix's picture


Title:ComputeCommandQueue.Wait(...) doesn't append a new event to the list.» ComputeCommandQueue.Wait(...) documentation is wrong
Status:confirmed» fixed