🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #1394

Re: CreateProcess() in Automation server freezes caller

#1394
From: Remy Lebeau (TeamB)
Date: Wed, 12 Sep 2007 17:28
27 lines
2409 bytes
"Wiebe Vos" <wiebe@foxware.nl> wrote in message
news:46e7c1df$1@newsgroups.borland.com...

> The automationserver, once initially started from the main application,
> runs independend in the background and at certain intervals (via a timer)
> it launches the thirdparty program. This downloads a substantial amount
> of (stockmarket) data to a file, whose content is subsequently processed
> by the automationserver. After completion, the automationserver notifies
> the main application who takes further care of the data.

All the more reason you should be using asynchronous events.  Then there is
no blockage at all.  When the work is done, the server will tell the app
when it is ready.  The main application does not have to wait on anything.
This works especially well if the download is in its own thread that
notifies the server when the download is finished.  Then the download is not
blocking anything, not even the server that is doing the download.

> Anyhow the problem is solved by applying Bob Gonders suggestion.

Technically yes, but I would not recommend running a message queue from
inside the server itself.  It has no way of knowing what kind of app is
using it, what kind of messages to expect, whether those messages will cause
reentrant issues if processed at the wrong time, etc.


Gambit
Technical Details
Message-ID: <46e82290$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!feeder3.cambrium.nl!feeder2.cambrium.nl!feed.tweaknews.nl!193.201.147.84.MISMATCH!xlned.com!feeder1.xlned.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <46e69558$1@newsgroups.borland.com> <46e6cfc6$1@newsgroups.borland.com> <46e7c1df$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ab74d8f845bd4978
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <46e69558$1@newsgroups.borland.com> <46e6cfc6$1@newsgroups.borland.com> <46e7c1df$1@newsgroups.borland.com>
Subject: Re: CreateProcess() in Automation server freezes caller
Date: Wed, 12 Sep 2007 10:28:40 -0700
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 75.83.29.61
Message-ID: <46e82290$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1189618320 75.83.29.61 (12 Sep 2007 10:32:00 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!feeder3.cambrium.nl!feeder2.cambrium.nl!feed.tweaknews.nl!193.201.147.84.MISMATCH!xlned.com!feeder1.xlned.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail