From mint-bounce@lists.fishpool.fi Sat Oct 30 15:37:08 2004 X-Original-To: fnaumann@mail.boerde.de Delivered-To: fnaumann@mail.boerde.de Message-ID: <1099143369.418398c9927a2@imp6-q.free.fr> Date: Sat, 30 Oct 2004 15:36:09 +0200 From: Xavier Joubert To: mint@fishpool.com Subject: Re: [MiNT] Fpoll() in GEM programs References: <417CD550.80306@atari.org> <20041027172635.1489.qmail@mailcz.in.systinet.com> <417FE0B2.5010403@utbm.fr> <200410280115.29861.h.robbers@chello.nl> <20041028084227.K3028@muecke.local> <200410 In-Reply-To: <1099125907.4183549370b3e@imp4-q.free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 User-Agent: Internet Messaging Program (IMP) 3.2.5 X-Originating-IP: 213.103.223.27 Content-Transfer-Encoding: quoted-printable X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-To: mint-bounce@lists.fishpool.fi X-original-sender: xavier.joubert@free.fr Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: X-Virus-Scanned: by amavisd-new at relay.boerde.de X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on relay.boerde.de X-Spam-Status: No, hits=0.3 tagged_above=-50.5 required=3.8 tests=BAYES_00, RCVD_IN_DYNABLOCK, RCVD_IN_SORBS X-Spam-Level: Hello Arnaud, Selon arnaud.bercegeay@free.fr: > SOLUTION 2 : > > Create a thread for select() stuff. The thread will have select() as ma= in > loop, > and the main application will have evnt_multi() as main loop... but a d= ialog > between the main application and the thread is needed (otherwise, the m= ain > application and the thread may be splitted in 2 independant programs). > So, we just have to create a pipe (?) between the main process and > the thread... and then we have to add a select() loop in the main appli= cation > to manage this pipe. We're back at the starting point. Is it impossible for the "select()" thread to simply send an AES message = to the "evnt_multi()" thread ? For example to ask it to update a progress bar, o= r notify it that there was an error while processing. On the opposite side, "evnt_multi()" thread could write to a pipe to send= some informations to the "select()" thread. For example : user clicked the "Ab= ort" button ; current processing should be aborted and thread closed. I think this can be done thanks to your work on MT gemlib. Of course, an alternative way that would avoid multi-threading could also= handy. Best regards, Xavier