J
Jon Pope
Currently, I'm investigating various architecture designs which involve
maintaining a DataTable object within a background thread. I have various
grids which will feed from that DataTable via DataView objects. Thus the
layout is:
DataTable object (worker thread) -> DataView object (main thread) ->
GridControl (main thread)
The DataTable object is instantiated within the main thread, then supplied
to my worker thread class.
Currently, my background thread makes updates/inserts/deletes to that
DataTable, then via the DataViews, the grids are automagically updated to
show those changes. A vast majority of the time this works well. However,
occasionally I'll get the big red "X" on my grid control, which typically
means I'm doing something wrong threading-wise. Only the worker thread is
making modifications to the DataTable, while the main thread should just be
reading from it.
Is my basic design thread-friendly? Or is my design flawed?
Cheers, Jon
maintaining a DataTable object within a background thread. I have various
grids which will feed from that DataTable via DataView objects. Thus the
layout is:
DataTable object (worker thread) -> DataView object (main thread) ->
GridControl (main thread)
The DataTable object is instantiated within the main thread, then supplied
to my worker thread class.
Currently, my background thread makes updates/inserts/deletes to that
DataTable, then via the DataViews, the grids are automagically updated to
show those changes. A vast majority of the time this works well. However,
occasionally I'll get the big red "X" on my grid control, which typically
means I'm doing something wrong threading-wise. Only the worker thread is
making modifications to the DataTable, while the main thread should just be
reading from it.
Is my basic design thread-friendly? Or is my design flawed?
Cheers, Jon