Updating tableview from non-UI thread [message #1691053] |
Wed, 01 April 2015 21:48 |
Mathew Benson Messages: 12 Registered: July 2010 |
Junior Member |
|
|
I'm writing a plugin that uses an asynchronous Redis client to populate data in a tableview. I have to create a separate listener thread for new data, but when I try to write the new data to the tableview, I get the invalid thread access error. When I wrap this around:
Display.getDefault().asyncExec(new Runnable()
It works but the update is unacceptably slow. For my test, I have 8 rows with 4 columns that should be updated at 1 Hz. It takes 30 to 60 seconds just to get the initial update. Obviously, this is not the best way to do this. I have views in the making that I want to eventually update at 30 Hz. What's the best way to do this? Is it possible to add functions to the main event thread to pull new data in at a higher rate rather than push it whenever the UI gets around to it.
|
|
|
Powered by
FUDForum. Page generated in 0.03152 seconds