
ComputeCommandQueue.Wait(...) documentation is wrong
Posted Thursday, 4 March, 2010 - 16:59 by Jeff| Project: | Cloo |
| Version: | 1.0-dev |
| Component: | Documentation |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | fixed |
Jump to:
Description
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.


Comments
#1
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.
#2
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().
#3
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!
#4