This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Some time ago I asked about performing SaveChanges in a separate thread (http://www.mindscapehq.com/forums/thread/231278). I've implemented an Interceptor and everything is working fine :-) However I'd like to go further with multithreading. I'd like to run a few tasks which could simultaneously write to the Lightspeed objects. I can assure that no SaveChanges is performed in between, and also that every thread modifies different set of fields in the objects. I've noticed that UOW collects all the changes in a ChangeTracker. The question is: could ChangeTracker be thread-safe? I think myself: if ChangeTracker used some thread-safe collections, it could register all the changes correctly even if they came from different threads. The same would be necessary for the EntityMap. Probably it would be sufficient to run multithreading as I described. |
|
|
ChangeTracker internally uses List I will pop an item on our backlog to have a look at implementing some internal synchronization more generally across LightSpeed though.
|
|