Your plan to pre-fetch a lot of data seems like a good idea.
If your functions are not marked as IsThreadSafe=true, then they will always run on the main Excel thread.
A good sample for a more sophisticated async / batch calls is this one:
https://github.com/Excel-DNA/Samples/blob/master/Misc/AsyncBatchSample.cs
Using that approach to populate a local cache should work well.
-Govert
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at https://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.
Hi Kishor,
UDFs that are not registered as IsThreadSafe=true will always execute on the main Excel thread one after the other (though the sequence in which the functions are evaluated might not be the same sequence as they appear in the worksheet).
If you are using some asynchronous execution mechanism like calling ExcelAsyncUtil.Run, the delegates you pass to ExcelAsyncUtil.Run would run on multiple thread on the .NET ThreadPool. But the actual UDF functions (the method marked with [ExcelFunction]) won’t run concurrently.