473,698 Members | 2,156 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

invoking the execution of a function on another thread

Jon
Hi,

"THREAD_UI" = thread under which the UI controls were created.
"THREAD_XX" = another thread.
"FUNC_UI" = function that needs to run on THREAD_UI.

From THREAD_XX I need to start the execution of FUNC_UI, that needs to
run on THREAD_UI. Inside FUNC_UI, I will modify many controls present
on the form. Since I don't want to use Invoke() or BeginInvoke() for
each of those calls, this is why I thought it would be more efficient
if FUNC_UI run on THREAD_UI.

How, from THREAD_XX, can I invoke FUNC_UI to run on THREAD_UI ?

FUNC_UI is not tied to any single control. Invoke() and BeginInvoke()
are member methods of one control. Is there an elegant way to invoke
FUNC_UI without having to refer to a specific control?

Thank you very much,
Jon
Mar 18 '08 #1
0 1101

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

Similar topics

6
4616
by: Manuel | last post by:
Can I invoke a function before main I could do it by invoking it in a Global object's constructor . Is there any other method other than this. Manuel
13
7775
by: Patrick | last post by:
I understand that with IIS5.1 on Windows XP Professional SP1, I can 1) Either set under IIS Manager-> Any specific Virtual Directory-> Configuration->Options->ASP Script timeout for all pages within that directory OR 2) Within a specific page, set the timeout as per http://www.microsoft.com/windows2000/en/server/iis/default.asp?url=/windows2000/en/server/iis/htm/asp/vbob246s.htm e.g. <% Server.ScriptTimeout = 1 %> and that the value in...
1
3412
by: Chris LaJoie | last post by:
Hi, I have an app that runs many simultaneous threads. I have noticed (took me a while to figure out what it was doing though) that sometimes if there is a problem, the thread will simply terminate on the line that caused a simple exception, but does not throw any error or inform me in any way. I recently found one of these problems in a function that does an int.Parse(string), however, there are many more. I was apparently wrong in...
3
4447
by: Robert Sorger | last post by:
I have a problem with thread execution after calling response.redirect() in a web form. Basically, I want the thread to continue to work (e.g. do some long database work) but want to redirect immediately to another page, so that the user does not have to wait. I tried the wollowing exemple with two webforms webform1.aspx and webform2.aspx : WebForm1.aspx just has one button which, when clicked, executes the following method
10
6861
by: greenb | last post by:
Our asp.net web app uses a .NET component (DLL) in the bin directory to call several stored procedures back to back to perform updates. They don't return any data. Sometimes the total execution time can take 2-3 minutes, but even though I have set the executionTimeout in web.config to a high number of seconds (2400), the request will still time out after 90 seconds. The user sees a Request timed out error. The app logs a ThreadAborted...
25
2504
by: MuZZy | last post by:
Hi, I'm currently rewriting some functionality which was using multithredaing for retrieving datasets from database and updating a grid control. I found that the grids (Infragistics UltraGrid, though it doesn't matter) were updated (i.e. grid.DataSource = dsDataSet;) and used for different purposes in the worker thread, so now i'm wrapping all those calls to grid's methods thru invoking which is a pain in the a$$ considering number of...
17
5075
by: romixnews | last post by:
Hi, I'm facing the problem of analyzing a memory allocation dynamic and object creation dynamics of a very big C++ application with a goal of optimizing its performance and eventually also identifying memory leaks. The application in question is the Mozilla Web Browser. I also have had similar tasks before in the compiler construction area. And it is easy to come up with many more examples, where such kind of statistics can be very...
3
1721
by: Thijs | last post by:
Hello everybody, I´ve got a problem that´s slightly complicated (at least to me it seems) so I will try to state it as clearly as possible. At a certain point in time, I start a second thread that runs one of my functions. The function in this second raises events. As you might know, the eventhandler for this event is executed within this second thread and not within the first. It´s not possible to update properties of a user control...
2
5565
by: =?Utf-8?B?SmltIE93ZW4=?= | last post by:
Hi John, Hopefully this post will find its way back to you - or perhaps be answered by someone else. As I mentioned in my last post on the earlier portion of this thread, changing the serialization settings for the build handled the initial slows we encountered when invoking the web service. Since that time, we ported the original VB.net code over to C# - this was done to make it cleaner easier to include the project in the rest of...
0
8674
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9157
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
9027
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
8895
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
8861
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
7725
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
4369
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...
1
3046
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
2001
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.