Paul Houx
Paul Houx
Perhaps we can implement the `cancel` method in a different way, so that it directly notifies all waiting threads to cancel, without using a boolean for that. After the call...
I think this is a better solution. The call to `cancel` now waits until all other threads have canceled and then reinstates the buffer automatically.
Here's a Gist that you can use to test it. Just copy-paste it over the BasicApp sample: https://gist.github.com/paulhoux/fb202c6dcaddc7933687
@richardeakin thanks for your suggestion to use a condition variable instead of a sleep(0). It made the code even cleaner.
I've tested this with 32 consumer threads and the main thread acting as a producer thread plus one additional producer thread that pushes a value every 1 milliseconds. Canceling from...
You're sharp, dude. I'll do a test to see what happens if there aren't any threads waiting for results.
What's the use case for this?
As a side note: ``` float deltaX = x2 - x1; float deltaXSqr = deltaX * deltaX; float deltaY = y2 - y1; float deltaYSqr = deltaY * deltaY; float...
I see your point. But this change will affect projects that depend on the `.r`, `.g` and `.b` properties. If projects update to a Cinder version containing this change, they...
Ok, so what you're saying is that vec2's, vec3's and vec4's still have their r, g, b and a properties? Or am I misunderstanding the purpose of the PR? I...