Using Slate to observe an Array updated from another thread

Hi All,

I have an SListView which observes an array Data and a function running on another thread which receives item creation / deletion requests asynchronously. On receipt, I want to update Data and call RequestListRefresh on the UI component ( doing something like this [Tutorial] Slate SListView Example )

I had a couple of ideas on how to avoid synchronization issues e.g. Data being updated again in another thread after RequestListRefresh is called and being in an invalid state when the view attempts to read it:

  • Run the update / request function as a task on the game thread using AsyncTask
  • Add a mutex to the list UI component. Acquire the mutex in the component Tick and also when modifying Data

I haven’t used Slate before so I may be missing something obvious. Thanks for any help!