Closed mattrussmill closed 5 years ago
This should be handled by placing an intermediate object inbetween the menu and worker layers in the application. This should be handled as a slot buffer class in which signals can rapidly add things to a buffer through a slot (define appropriate data structure or stream), but a shared data structure between threads only allows to pop off the most recently added item. When the item is popped the remaining should be dropped.... sort of like a datagram (UDP-esque) version of signals and slots. This will keep the worker event loop from queuing unnecessary intermediate items when only the most recent signal should be acted on. Care will need to be taken to work out any race conditions.
This idea has been shelved until after the first release
By incorporating OpenCL into the project the images can be adjusted without choppy performance.
Sliders do not currently track, when released they signal the worker to begin work. This is because every time the value changes by one the worker's event queue is flooded with requests when the slider is moved a great distance.
It may be possible to interrupt additions to the event queue during scrolling. The worker (or main thread sending signals) can block or disconnect (or not send) signals while work is being performed. However the event on "released" cannot be blocked as this is the desired slider location.
In short, a scheme to prevent the event queue from filling during valueChanged() but will still add a value when released().