LinqConnect Professional Version 4.1.184 (07-Feb-2013) - access from two and more thread.

LinqConnect Professional Version 4.1.184 (07-Feb-2013) - access from two and more thread.

Postby AKRRKA » Tue 26 Feb 2013 15:27

We use some threads for parallel operations such as load data to user interface end store data from external source. Both threads use same one data context. When threads work with database simultaneously an exception "Net packets out of order" raised.
What do we wrong?

By sample:
Code: Select all
{"Net packets out of order: received[0], expected[7]"}
   в Devart.Data.MySql.av.a()
   в Devart.Data.MySql.av.i()
   в Devart.Data.MySql.al.c()
   в Devart.Data.MySql.al.a(Byte[]& A_0)
   в Devart.Data.MySql.MySqlDataReader.Read()
   в Devart.Data.Linq.Engine.ObjectReader`1.e()


How to work from different threads with a single context?
Please give an example as a small application.
AKRRKA
 
Posts: 194
Joined: Thu 26 Jan 2012 15:07
Location: Russia

Re: LinqConnect Professional Version 4.1.184 (07-Feb-2013) - access from two and more thread.

Postby StanislavK » Wed 27 Feb 2013 15:56

Could you please describe the purpose of using the same context in multiple threads? Generally, the DataContext object is not thread-safe, at least because the underlying connection object is not.

Please describe this scenario in more details, so that we are able to further investigate the issue. If possible, please send us a small test project with which the problem can be reproduced.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Re: LinqConnect Professional Version 4.1.184 (07-Feb-2013) - access from two and more thread.

Postby AKRRKA » Thu 28 Feb 2013 12:45

Well, than we will use separate data contexts for different threads.
Thanks!
AKRRKA
 
Posts: 194
Joined: Thu 26 Jan 2012 15:07
Location: Russia


Return to LinqConnect (LINQ to SQL support)