VL girlpower : _AsyncInput example is actually not async?

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

p.s. already noting the Trigger/Abort pattern on an AsyncTask region - but that isn’t invoked from an asynchronous callback (e.g. mouse action).

The answer seems related to IObservable which is used in the Image example of resampling bitmaps on a background thread

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.

1 Like

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.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.