473,396 Members | 2,102 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.

threading concept question-is this possible?

Just researching threading and I'm sure we need to do more review of
available resources BUT I'm wondering if what we're looking for is actually
possible. If it is we can keep reading.

I know it's more complex than this but conceptually we want to have one set
of instructions (one SUB probably) and run that same set of instructions
several times each in its own thread accessing some shared information and
some information specific to that instance.

I've seen examples where there are basically different sets of instructions
and each run in it's own thread.

Thanks.
Nov 20 '05 #1
5 1065
* "microsoft" <cu****@synergyontheweb.com> scripsit:
Just researching threading and I'm sure we need to do more review of
available resources BUT I'm wondering if what we're looking for is actually
possible. If it is we can keep reading.

I know it's more complex than this but conceptually we want to have one set
of instructions (one SUB probably) and run that same set of instructions
several times each in its own thread accessing some shared information and
some information specific to that instance.


Yes, that's possible.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
Hi,

you can call any static or instance method / property from threads, so
nothing prevents you from using this approach. The only issue as usual with
threads is synchronizing access to shared data.

HTH
Alex

"microsoft" <cu****@synergyontheweb.com> wrote in message
news:uk**************@TK2MSFTNGP12.phx.gbl...
Just researching threading and I'm sure we need to do more review of
available resources BUT I'm wondering if what we're looking for is actually possible. If it is we can keep reading.

I know it's more complex than this but conceptually we want to have one set of instructions (one SUB probably) and run that same set of instructions
several times each in its own thread accessing some shared information and
some information specific to that instance.

I've seen examples where there are basically different sets of instructions and each run in it's own thread.

Thanks.

Nov 20 '05 #3
Thanks. A follow-up question. In VB6 to accomplish what we are doing we
created an out-of-process ActiveX.exe which would load multiple instances.
We passed the information to it and ran many instances. Do you think
threading would be a better approach now that vb.net seems to able to handle
that?

(Basically the app gets data from another application (a live data feed for
several futures and stocks) and then passes this data as it arrives to
stored procedures in MSSQL2000 for processing and inserting into a couple of
tables).

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2l************@uni-berlin.de...
* "microsoft" <cu****@synergyontheweb.com> scripsit:
Just researching threading and I'm sure we need to do more review of
available resources BUT I'm wondering if what we're looking for is actually possible. If it is we can keep reading.

I know it's more complex than this but conceptually we want to have one set of instructions (one SUB probably) and run that same set of instructions
several times each in its own thread accessing some shared information and some information specific to that instance.


Yes, that's possible.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #4

"microsoft" <cu****@synergyontheweb.com> wrote in message
news:ul**************@TK2MSFTNGP12.phx.gbl...
Thanks. A follow-up question. In VB6 to accomplish what we are doing we
created an out-of-process ActiveX.exe which would load multiple instances.
We passed the information to it and ran many instances. Do you think
threading would be a better approach now that vb.net seems to able to handle that?


The ActiveX EXE approach in VB6 was a bit cumbersome and hard to get *just*
right, but very reliable once you got the hang of it.

But yeah, now that .NET supports threads natively there's no need to do
something like that. A single process with multiple threads will work just
fine in most cases.
--
Klaus H. Probst, MVP
http://www.vbbox.com/
Nov 20 '05 #5
* "microsoft" <cu****@synergyontheweb.com> scripsit:
Thanks. A follow-up question. In VB6 to accomplish what we are doing we
created an out-of-process ActiveX.exe which would load multiple instances.
We passed the information to it and ran many instances. Do you think
threading would be a better approach now that vb.net seems to able to handle
that?

(Basically the app gets data from another application (a live data feed for
several futures and stocks) and then passes this data as it arrives to
stored procedures in MSSQL2000 for processing and inserting into a couple of
tables).


Yes, you could start multiple threads, each doing its work. You don't
need separate components to do that in .NET, you can do that within
your, for example, Windows Forms project.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #6

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

Similar topics

2
by: Egor Bolonev | last post by:
hi all my program terminates with error i dont know why it tells 'TypeError: run() takes exactly 1 argument (10 given)' =program==================== import os, os.path, threading, sys def...
0
by: Alina | last post by:
Hello I'm working with a disconnected DataSet and I wish to make thread-safe the "add new rows" method. I try like this, but does not work: public class MyXmlDataDoc { ........
2
by: Ed Bick | last post by:
I'm very green with this concept. I saw a post before which applied I think, but I can now not find it. I am using Mappoint, a com control which can be very slow to load. I was thinking as a...
9
by: akrapus | last post by:
Hi, I am trying to understand how to use threading in Python. I get threading as a concept, but not the implementation. In order to start threading, do you call it as a separate function,...
3
by: Oleg | last post by:
Let's say I have a thread, long running, span by page1. I'm redirected to page2. In order to stop process in the thread i need to send command.close(). Q: can i store a reference to a command...
4
by: Doug | last post by:
Hi, I am looking to write my first application that will use threading. I understand the concept but am not that familiar with the details of how to make this work in code. Does anyone have...
2
by: Ivan | last post by:
I have a class Foo which have two property. I have a thread that do some process and update class Foo int B. I have a datagridview on main form. this datagridview data source to this class Foo and...
1
by: sirigiri | last post by:
the threading concept was designed hardly for me.shall u give the tips to break the hard stones
2
by: HardySpicer | last post by:
I looked here http://www.devx.com/DevX/10MinuteSolution/20365 and found that he uses a definition Dim t as Thread My version of vb 2005 does not accept this. Is this out of date? It has...
3
by: Sparky | last post by:
It seems strange, but I can't find a list of operating systems which support / don't support threading in Python. Can anyone point me in the right direction? Thanks, Sam
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: 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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
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...
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.