praxis-live / support

Documentation and issue tracking
9 stars 2 forks source link

Ref<T> asyncReplace / asyncTransform? #80

Closed neilcsmith-net closed 6 years ago

neilcsmith-net commented 6 years ago

Provide a way to pass in lambda functions to Ref to be evaluated in a background thread? Would be the only way user code escapes the current thread sandbox (unless they're naughty and create their own threads of course! 😄 ) Might be the safest way to allow / encourage this? Should allow for user components to handle own data loading, etc.

Ref<T> asyncReplace(Supplier<? extends T> supplier);
Ref<T> asyncTransform(K key, Function<K, T> function);