Is ASP.NET and Thread Safety an Issue?

Posts   
 
    
briankb
User
Posts: 51
Joined: 03-Jun-2007
# Posted on: 05-Jul-2007 18:35:24   

Just noticed the blue box in the help about using the LLBLGen DataAccessAdapter method. It says it is not thread safe.

Is this an issue for Windows applications only or do I need to worry about this in an ASP.Net web site?

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 06-Jul-2007 11:44:14   

It's perfectly safe to use it as long as you don't share an instance of it among different threads.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 06-Jul-2007 11:46:30   

e.g.: if you share an adapter in the application object of asp.net, you're sharing it across threads. Just create one when you need one and when you're done dispose the adapter.

Frans Bouma | Lead developer LLBLGen Pro