473,396 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Safe multithreading in web application

Hi All,

Following is a quote from an article on MSDN.

Article Title: Safe, Simple Multithreading in Windows Forms
URL:
http://msdn.microsoft.com/library/en...asp?frame=true

Language: C#

"The use of Invoke has finally given me a safe use of multithreading in
my Windows Forms application. The UI thread spawns a worker thread to
do the long-running operation, and the worker thread passes control
back to the UI thread when the UI needs updating."

This is a great article, and comes in handy if your working with
Windows Forms.

But what if you're working with web applications? What is the
underlying UI thread? For instance, I cannot simply use
"this.Invoke(.....)" in a web application on my form(s).

Can someone please help me? Any suggestions will be greatly
appreciated.

My goal is to have a page with some user input textboxes, and a larger,
multiline textbox. Ideally, I'd like the multiline textbox to update
continually, using worker threads to gather information (based on the
user input) and pass it back to the main UI thread to update the
multiline textbox - a scrolling effect would be nice.

I've tried simulating the aforementioned Windows Forms model using
AJAX, but the process doesn't work as well as I'd like - especially
considering I'd like to return more complex datatypes from my methods.

Thanks!

Jul 19 '06 #1
0 1343

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

Similar topics

9
by: Andy Chang | last post by:
Hi, If I have this function void DoSomething(int& index) { ::Sleep(10000); DoSomethingWith(index); } Is the variable index thread safe? Meaning that if I call this from two
47
by: mihai | last post by:
What does the standard say about those two? Is any assurance that the use of STL is thread safe? Have a nice day, Mihai.
20
by: Sacha | last post by:
Consider I have a working thread like this, while (1) { if ( g_pObject ) g_pObject->DoOneStep(); } with an class hierarchie like this
1
by: Jeff Yang | last post by:
These days,I have read the artile "Safe, Simple Multithreading in Windows Forms, Part 1" on MSDN,and I also runed the example of it....
8
by: Robert Zurer | last post by:
I have a server application that makes a MarshalByReferenceObject available via remoting. It's lifetime is set to never expire and it is implemented as a Singleton. Are calls to this object...
16
by: Robert Zurer | last post by:
Can anyone suggest the best book or part of a book on this subject. I'm looking for an in-depth treatment with examples in C# TIA Robert Zurer robert@zurer.com
16
by: who be dat? | last post by:
Consider the following code which enables multithreading in an ASP.Net application I'm writing: Code in global.asx Application_start subroutine, Threadnotify is declared Globally as a new thread...
44
by: climber.cui | last post by:
Hi all, Does anyone have experience on the thread-safty issue with malloc()? Some people said this function provided in stdlib.h is not thread- safe, but someone said it is thread safe. Is it...
2
by: Roy Smith | last post by:
I'm perusing PEP-3108 and came upon this interesting statement (under the "Hardly used" section): mutex Not thread-safe. How can a mutex, whose sole reason for existence is to mediate thread...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...

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.