extends AnyVal in case of https://github.com/scala/bug/issues/10647
A plug-in that retains every Event created by
and waiting at least one second before releasing it.
This is a workaround for https://github.com/ThoughtWorksInc/Compute.scala/issues/51
HandleEventInExecutionContext should be unnecessary because only OpenCL calls to create contexts or command-queues, or blocking OpenCL operations are undefined behavior, according to https://www.khronos.org/registry/OpenCL/sdk/1.2/docs/man/xhtml/clSetEventCallback.html and we don't use those forbidden functions. Our usage should be fine according to the OpenCL specification. However, AMD SDK always crashes for any reentry calls (e.g. https://travis-ci.org/Atry/DeepLearning.scala/jobs/318466522), no matter if they are blocking or not. There is also similar bug in Intel's OpenCL implementation As a workaround, always enable this HandleEventInExecutionContext for Intel's and AMD's OpenCL implementation.
If you are using Intel OpenCL SDK, you will need this plug-in as a workaround