473,785 Members | 2,767 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

multithread in an application WEB? ??


Hi friends,
So that you would use multithread in an application WEB?

Thanks

Cesar
Jun 15 '07 #1
7 1235
ya,
"AAAAA" <AA***@hotmail. comwrote in message
news:%2******** *******@TK2MSFT NGP06.phx.gbl.. .
>
Hi friends,
So that you would use multithread in an application WEB?

Thanks

Cesar

Jun 15 '07 #2

All web applications are multithreaded by default (each aspx request
is handled by any of a large number of worker threads).

Sam

------------------------------------------------------------
We're hiring! B-Line Medical is seeking .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.
On Thu, 14 Jun 2007 23:19:21 -0500, "AAAAA" <AA***@hotmail. comwrote:
>
Hi friends,
So that you would use multithread in an application WEB?

Thanks

Cesar
Jun 15 '07 #3
Samuel R. Neff <sa********@nom ail.comwrote in
news:6i******** *************** *********@4ax.c om:
All web applications are multithreaded by default (each aspx request
is handled by any of a large number of worker threads).
But is it correct to say that my aspx/code-behind class is instantiated
anew on each request to it?

Or is it at least guaranteed that the instance of my class won't receive a
second request while it is processing the first request?

Or can I risk that there is only the one instance of my class, and it can
receive a second request while it is still processing the first request?
/Peter
Jun 15 '07 #4
* Peter K wrote, On 15-6-2007 10:24:
Samuel R. Neff <sa********@nom ail.comwrote in
news:6i******** *************** *********@4ax.c om:
>All web applications are multithreaded by default (each aspx request
is handled by any of a large number of worker threads).

But is it correct to say that my aspx/code-behind class is instantiated
anew on each request to it?

Or is it at least guaranteed that the instance of my class won't receive a
second request while it is processing the first request?

Or can I risk that there is only the one instance of my class, and it can
receive a second request while it is still processing the first request?
/Peter
A new instance is used for each request. There can be more than one
request to the same page being handled at the same time, so there can be
multiple instances (so avoid the use of static properties & fields).

Jesse
Jun 15 '07 #5
"Jesse Houwing" <je***********@ nospam-sogeti.nlwrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
A new instance is used for each request. There can be more than one
request to the same page being handled at the same time, so there can be
multiple instances (so avoid the use of static properties & fields).
Unless you use the appropriate locking on your critical regions.
Static properties & fields can be very usefull.

Kind Regards,
Allan Ebdrup
Jun 15 '07 #6
Hi,

"Peter K" <xd****@hotmail .comwrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
Samuel R. Neff <sa********@nom ail.comwrote in
news:6i******** *************** *********@4ax.c om:
>All web applications are multithreaded by default (each aspx request
is handled by any of a large number of worker threads).

But is it correct to say that my aspx/code-behind class is instantiated
anew on each request to it?
Yes, that's correct each time a new instance is created and the controls's
values populated based on the state being returned by the page.
Or is it at least guaranteed that the instance of my class won't receive a
second request while it is processing the first request?
Each request will have its own individual instance
Jun 15 '07 #7
* Allan Ebdrup wrote, On 15-6-2007 13:53:
"Jesse Houwing" <je***********@ nospam-sogeti.nlwrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
>A new instance is used for each request. There can be more than one
request to the same page being handled at the same time, so there can be
multiple instances (so avoid the use of static properties & fields).

Unless you use the appropriate locking on your critical regions.
Static properties & fields can be very usefull.
Agreed. But only if you know what you're doing.
Jun 15 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1619
by: Alice | last post by:
Hello I have four multithread windows applications(vb.net) interacting and running on the same machine(windows 2000 with .net framework 1.0). All of them start a new thread each time Filewatcher's created or deleted event is fired. One of these application writes data into word documents also in multithread fashion. Sometimes the created and the deleted events of FileWatcher are not fired in one application - not the same one each time. Any...
0
1865
by: r_obert | last post by:
Hello, I'm trying to create a worker thread for my VC++ program, and was wondering whether I should be linking with the Multithread /MT or Multithread DLL /MD option? I'm not quite sure, in layman's terms, what the difference is. When I build with Multithread DLL, the linker complains about not being able to find a bunch of "unresolved external symbols" associated with nafxcwd.lib.
4
7091
by: zbcong | last post by:
Hello: I write a multithread c# socket server,it is a winform application,there is a richtextbox control and button,when the button is click,the server begin to listen the socket port,waiting for a incoming connection,the relative code snipprt as following:: private IPAddress myIP=IPAddress.Parse("127.0.0.1"); private IPEndPoint myServer; private Socket socket; private Socket accSocket; private System.Windows.Forms.Button button2;...
2
26521
by: zhebincong | last post by:
Hello: I write a multithread c# socket server,it is a winform application,there is a richtextbox control and button,when the button is click,the server begin to listen the socket port,waiting for a incoming connection,the relative code snipprt as following:: private IPAddress myIP=IPAddress.Parse("127.0.0.1");
0
1318
by: fred | last post by:
I need some help in trying to understand how to make myCollection (inherited from CollectionBase) multithread safe. Taking my implementation of the Add Sub and a readonly property Item. Public Sub Add(ByVal aDoc As myDocument) List.Add(aDoc) End Sub Can I make this multithread safe by and is this the best way to do it.
4
3838
by: amberti | last post by:
I'm trying to write a multithread application: it will get different kind of data from DB, my intention was to create different thread for each query. I tryed to use the AsyncHelper.FireAndForget method u can easily find on this goup but i wasn't lucky: I was able to crate threads but not to get back results.... Any idea/modification of AsyncHelper.FireAndForget will be gratly appreciated.
6
2825
by: jmartin | last post by:
Hi, I have made a multithread version of a program (load a file into database), and with two processors I get the double of time in the multithread than in the process (unithread) version. I have done the test of creating a unique thread that does the same code that the process version of the program and it takes more time that the process without creating the thread.
0
1402
by: Gordon Cone | last post by:
I am currently debugging a deadlock in a multithread C# application. It makes lots of calls to legacy unmanaged code. The application runs on windows sever 2003 and uses the sever version of the CLR. The application runs on ..NET 1.1 SP1. When the deadlock happens the process is using 0 CPU. I was able to collect crash dumps and have been trying to make sense out of them using windbg.
0
2747
by: Gordon Cone | last post by:
I am currently debugging a deadlock in a multithread C# application. It makes lots of calls to legacy unmanaged code. The application runs on windows sever 2003 and uses the sever version of the CLR. The application runs on ..NET 1.1 SP1. When the deadlock happens the process is using 0 CPU. I was able to collect crash dumps and have been trying to make sense out of them using windbg.
0
10329
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10152
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10092
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8974
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.