473,385 Members | 1,569 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,385 software developers and data experts.

WaitForMultipleObjects equivalent in .Net?

Hi,
I need to implement my own ThreadPool class because I want to have
control over the threads and their lifetimes. The ThreadPool class will take
care of thread recovery in case threads lock up and the implementation
provided by .Net does not provide for the same.

My question now is that enqueing of jobs into my threadpool requires me
to wait for an available thread or a stop processing signal (which is
handled by a ManualResetEvent). What I now require is a
WaitForMultipleObjects kind of .Net call that will allow me to wait on the
executing threads or the ManualResetEvent to take further action.

Is there such a system call available in .Net (in .Net 1.1 or 2.0) ? Is
there any way I can simulate such an activity?

Thanks in advance,
Madhu
Nov 17 '05 #1
1 11348
WaitHandle.WaitAll or WaitHandle.WaitAny

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Hi,
I need to implement my own ThreadPool class because I want to have
control over the threads and their lifetimes. The ThreadPool class will take
care of thread recovery in case threads lock up and the implementation
provided by .Net does not provide for the same.

My question now is that enqueing of jobs into my threadpool requires me
to wait for an available thread or a stop processing signal (which is
handled by a ManualResetEvent). What I now require is a
WaitForMultipleObjects kind of .Net call that will allow me to wait on the
executing threads or the ManualResetEvent to take further action.

Is there such a system call available in .Net (in .Net 1.1 or 2.0) ? Is
there any way I can simulate such an activity?

Thanks in advance,
Madhu
Nov 17 '05 #2

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

Similar topics

14
by: John | last post by:
Is there an equivalent of COM on Linux that I can get through Python. My need is to have some sort of language independent component framework. I can think of CORBA but I have to have a server...
2
by: Michael Foord | last post by:
Please pardon my ignorance on this one - but I'm not certain how the sign bt is treated in python bitwise operators. I've trying to convert a javascript DES encryption routine into python. ...
7
by: Tim Conner | last post by:
Hi, I am an ex-delphi programmer, and I having a real hard time with the following simple code (example ): Which is the equivalent to the following code ? var chars : PChar; sBack, s :...
3
by: bb | last post by:
I have a windows network device driver written in c++ and a user interface im porting to c#, my problem is i dont seem to be getting notified of the event calls from the driver to the c# app im...
10
by: karch | last post by:
How would this C# contruct be represented in C++/CLI? Or is it even possible? PolicyLevel level = (enumerator->Current) as PolicyLevel; Thanks, Karch
9
by: Alan Silver | last post by:
Hello, I'm converting some old VB6 code to use with ASP.NET and have come unstuck with the Asc() function. This was used in the old VB6 code to convert a character to its ASCII numeric...
14
by: grid | last post by:
Hi, I have a certain situation where a particular piece of code works on a particular compiler but fails on another proprietary compiler.It seems to have been fixed but I just want to confirm if...
3
by: Pinux | last post by:
Hi, I am writing a multi-threads encryption application. The idea of the code is to create a number of threads to encrypt files. I have a thread pool say the maximum threads is 10. If the number...
3
by: Abubakar | last post by:
Hi all, I'm using WaitForMultipleObjects, I give an array of handles and give it FALSE in bWaitAll param. What I want to do is, I spawn few threads upto N, than I wait for any of them to end, when...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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

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.