Hey there,
I am trying to create an asynchronous thread-safe callback following the
guidelines
here
http://julia.readthedocs.org/en/latest/manual/calling-c-and-fortran-code/#thread-safety
Trying to do one thing after another I tried to manually call my callback
via the thread safe and asynchronous matter described in the documentation.
My basic test case looks like this:
success = false
function cb(status, data)
println(status)
println(data)
success = true
return nothing
end
cb_packaged = Base.SingleAsyncWork(cb)
ccall(:uv_async_send, Void, (Ptr{Void},), cb_packaged.handle)
yield()
Since all this happens in one thread I would assume that this should work
without a problem. But nothing happens, no error, no SIGSEV.
Any idea where I might be going wrong?
Best,
Valentin