According to the V4 help patch, it mentions that the VL patch executes independantly of the mainloop. However, upon inspection it seems that it’s just using the Sampler node to delay any incoming notifications so that they occur on the next mainloop update.
Are there more examples of doing actual VL operations off of the MainLoop which are triggered by upstream notifications?
I presume this would involve some kind of async invoke/delegate pattern?
p.s. : question is purely academic…no application right now
you are right, just had a look at it. that is not a good example. it should rather be called “getting async input data to the mainloop” or so… async execution can be done with the ForEach reactive region.
a follow up comment on this: in the demo patch there is an input device that potentially sends more than one event per frame which means that the sampler will output a spread of events on the mainloop. processing this spread of events on the mainloop is what most games are doing as well. the advantage of this is that the events stay in order and have their effect on the main thread at a specific moment in the mainloop, which reduces complications and doesn’t require locks.
in the observable world, before it passes to the mainloop, you can pre process, filter or alter the events to your liking.