but perhaps it isn't, or we aren't using it correctly, since there has been a report of this error when running the startup animation along with redraws from lua scripts:
( caveat: this error hasn't been noticed on norns hardware, only on rpi3 + push2 setup. )
if we can't call to the same cairo_t and cairo surface from different threads, then perhaps the most robust solution is to use the event loop for screen drawing requests.
other options:
move startup animation logic to main thread
give the startup animation thread its own cairo instance
thread safety in cairo (or the lack thereof) is a little unclear to me. it is supposed to generally be reentrant: https://bugs.freedesktop.org/show_bug.cgi?id=74355 https://stackoverflow.com/questions/25726017/is-the-cairo-graphics-library-reentrant
but perhaps it isn't, or we aren't using it correctly, since there has been a report of this error when running the startup animation along with redraws from lua scripts:
( caveat: this error hasn't been noticed on norns hardware, only on rpi3 + push2 setup. )
if we can't call to the same
cairo_t
and cairo surface from different threads, then perhaps the most robust solution is to use the event loop for screen drawing requests.other options: