Click here to Skip to main content
15,889,436 members
Home / Discussions / C#
   

C#

 
GeneralRe: Accessing CheckBox on row in Datagridview Pin
Luc Pattyn12-Jun-10 5:01
sitebuilderLuc Pattyn12-Jun-10 5:01 
GeneralRe: Accessing CheckBox on row in Datagridview Pin
Smith#12-Jun-10 5:24
Smith#12-Jun-10 5:24 
GeneralRe: Accessing CheckBox on row in Datagridview Pin
Luc Pattyn12-Jun-10 5:40
sitebuilderLuc Pattyn12-Jun-10 5:40 
GeneralRe: Accessing CheckBox on row in Datagridview Pin
dan!sh 12-Jun-10 5:07
professional dan!sh 12-Jun-10 5:07 
GeneralRe: Accessing CheckBox on row in Datagridview Pin
Smith#12-Jun-10 5:25
Smith#12-Jun-10 5:25 
GeneralRe: Accessing CheckBox on row in Datagridview Pin
Dr.Walt Fair, PE12-Jun-10 6:04
professionalDr.Walt Fair, PE12-Jun-10 6:04 
QuestionRe: Accessing CheckBox on row in Datagridview Pin
Smith#12-Jun-10 23:31
Smith#12-Jun-10 23:31 
QuestionThreading Question Pin
LimitedAtonement11-Jun-10 7:25
LimitedAtonement11-Jun-10 7:25 
Dear Sirs,

I've read google, MSDN and this site quite a bit and can't quite come up with the answer.

I've created a program (server) that is multi-threaded. Here are some descriptions:

Listener thread: This thread sits and listens for TCP connections. When it gets one, it creates a thread for that connection which gets data from that connection and interacts with the database, spawns processes, whatever the client asks for.
Scheduler thread: Certain tasks are scheduled to occur on the server, this thread sits tight and when the appropriate time (specified in config file) comes, it executes the tasks that need to happen one at a time (which then probably connect via the listener).
I would also like a GUI to monitor progress from the clients.

I currently have the following main method:
//[System.STAThread]
public static void Main(string[] args)
{
   _con = new DW_DB_Connection();//establishes connection with SQL database in ctor for use by clients.
   Start_Threads(); //starts listener and scheduler
   //System.Windows.Forms.Application.Run(new UI());
}

If I use a GUI, I need STA Thread, right?

My question is this: does STAThreadAttribute diminish the power of my application to multi-thread aggressively (and allow it to scale quite large)?

From what I've read, it might be the case that STA only has an effect when the application uses COM (here). The scheduler and listener do not...I think, but Windows Forms certainly does. But other sources say it changes the apartment state of the current thread to be single threaded.

Let me know what you think.
In Christ,
Aaron Laws

http://ProCure.com

AnswerRe: Threading Question Pin
#realJSOP11-Jun-10 7:29
mve#realJSOP11-Jun-10 7:29 
GeneralRe: Threading Question Pin
LimitedAtonement11-Jun-10 8:23
LimitedAtonement11-Jun-10 8:23 
AnswerRe: Threading Question Pin
Luc Pattyn11-Jun-10 8:31
sitebuilderLuc Pattyn11-Jun-10 8:31 
GeneralRe: Threading Question Pin
LimitedAtonement11-Jun-10 8:48
LimitedAtonement11-Jun-10 8:48 
GeneralRe: Threading Question Pin
Luc Pattyn11-Jun-10 9:03
sitebuilderLuc Pattyn11-Jun-10 9:03 
GeneralRe: Threading Question Pin
harold aptroot11-Jun-10 9:29
harold aptroot11-Jun-10 9:29 
GeneralRe: Threading Question Pin
LimitedAtonement11-Jun-10 10:31
LimitedAtonement11-Jun-10 10:31 
GeneralRe: Threading Question Pin
Luc Pattyn11-Jun-10 11:23
sitebuilderLuc Pattyn11-Jun-10 11:23 
GeneralRe: Threading Question Pin
Daniel Grunwald11-Jun-10 13:58
Daniel Grunwald11-Jun-10 13:58 
GeneralRe: Threading Question Pin
Luc Pattyn11-Jun-10 14:58
sitebuilderLuc Pattyn11-Jun-10 14:58 
AnswerRe: Threading Question Pin
LimitedAtonement15-Jun-10 2:49
LimitedAtonement15-Jun-10 2:49 
QuestionRe: Threading Question Pin
LimitedAtonement15-Jun-10 2:48
LimitedAtonement15-Jun-10 2:48 
QuestionProblem Here how can i deal [modified] Pin
Pellatrex11-Jun-10 2:14
Pellatrex11-Jun-10 2:14 
AnswerRe: Problem Here how can i deal Pin
Richard MacCutchan11-Jun-10 2:55
mveRichard MacCutchan11-Jun-10 2:55 
AnswerRe: Problem Here how can i deal Pin
R. Giskard Reventlov11-Jun-10 2:55
R. Giskard Reventlov11-Jun-10 2:55 
AnswerRe: Problem Here how can i deal Pin
Peace ON11-Jun-10 2:56
Peace ON11-Jun-10 2:56 
AnswerRe: Problem Here how can i deal Pin
Luc Pattyn11-Jun-10 3:00
sitebuilderLuc Pattyn11-Jun-10 3:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.