ddemidov/vexcl — pull request #130 by ddemidov (2014-05-16 12:19:24+00:00)
Title: Thread safety

This makes VexCL mostly thread safe with some exceptions.

1. Users should not submit same kernel to the same queue from different threads (this is imposed by the OpenCL standard);
2. `vex::Filter::Exclusive` wrapper is not thread safe. In case each thread creates its own `vex::Context`, the constructors should be serialized.
3. Function generator is not thread-safe and calls to `vex::generator::make_function` should be serialized.

`examples/benchmark` shows that the changes do not affect performance.

Closes #124 .