15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


threads

Shaina Shreedharan -- shaina@cdc.bflsl.vendors.compaq.com
Wednesday, December 04, 1996

Environment: NT4.0. Visual C++4.0

hello there,

i want to implement a queue manager....
which is waiting for network and internal
events... i feel a thread should implement
that.. How to implement this thread.. which
is alive throughout the application...
> >
Awaiting help,yjhiting help
Shaina
                    



James Cosand -- jhcosand@IN.NET
Friday, December 06, 1996

[Mini-digest: 2 responses]

	I have an example application I prepared sometime ago that shows how I
implement worker threads in an application.  You may download
ThreadDemo.zip at:

www.in.net/~jhcosand

	Let me know if you have any questions.

========================================
James H. Cosand
Software Engineer
Delco Electronics Corporation
Kokomo, Indiana

The contents of this note are my opinions.
I do not speak for Delco Electronics.

"No Good Deed goes Unpunished"
"A Friend in Need is a Pain in the Arse!"
"Do Unto Others and Split"

----------
> From: Shaina Shreedharan 
> To: mfc-l@netcom.com
> Subject: threads
> Date: Wednesday, December 04, 1996 6:24 AM
> 
> Environment: NT4.0. Visual C++4.0
> 
> hello there,
> 
> i want to implement a queue manager....
> which is waiting for network and internal
> events... i feel a thread should implement
> that.. How to implement this thread.. which
> is alive throughout the application...
> > >
> Awaiting help,yjhiting help
> Shaina
>                     
> 
> 
-----From: Pesce Roberto 

Environment: NT4.0. Visual C++4.0

hello there,

i want to implement a queue manager....
which is waiting for network and internal
events... i feel a thread should implement
that.. How to implement this thread.. which
is alive throughout the application...
> >
Awaiting help,yjhiting help
Shaina
                    
--------------- Reply separator -----------------

the best way I know to implement this feature is to perform an
infinite loop awaiting for the event(s); every time one of the audited
events arrive to your server you should activate a thread that will serve
its specified client. The main thread will loop again for events. Your main 
thread will die when the client attached closes connection.

I've used this method for an app I'm developing (using pipes), so if you 
need some more hints pls write me.




| Вернуться в корень Архива |