On Jun 14, 3:06 am, Jonathan Pryor <[email protected]> wrote:
> From:http://msdn.microsoft.com/en-us/library/system.data.linq.datacontext....
>
> Any public static (Shared in Visual Basic) members of this type
> are thread safe. Any instance members are not guaranteed to be
> thread safe.
>
> Granted, this is for .NET's DataContext type, but DbLinq aims to
> implement the same API, with the same constraints, as .NET's API.
>
> In short, DataContext is NOT thread safe, never has been, likely never
> will be, so your scenario is broken by design.
>
I didn't realise DataContexts were meant to be used in that fashion.
Thanks very much for pointing it out and after a quick refactor of my
code the initial indications are good with no weird errors so far. I
guess the key is to keep the DataContext objects light, as the
Microsoft link you provided points out. Andrus' testing may highlight
an inefficiency with the use of reflection in large assemblies but
that looks like ti could be optimised fairly easily.
Regards,
Aaron
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---