Re: Inter-thread communication to pass a job to another thread
From: Cor Ligthert (notfirstname_at_planet.nl)
Date: 05/26/04
- Next message: Cor Ligthert: "Re: Handling windows scroll"
- Previous message: mwazir: "Re: Excel and vb.net"
- In reply to: James Lavery: "Inter-thread communication to pass a job to another thread"
- Next in thread: Charles Law: "Re: Inter-thread communication to pass a job to another thread"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 26 May 2004 11:04:35 +0200
Hi James,
This seams a bit as Charles Law is busy with, however I get the idea you
have fixed the part of the serial port to the database as I understand your
question well. Maybe you can have a look at his problem in this newsgroup
and give him some advices.
In my opinion is the FTP is a File Transfer Protocol, so you can only send
file by file (that can be done in more threads) however in my idea that can
only be done when the file is complete.
In a message I gave Charles the idea to use a queue. The same idea I get
when I hear your problem. To Charles I said that a simple arraylist is very
suitable for his problem in my opinion. However for you problem I think that
can be even more. Putting in that queue the files which have to be
transfered can be a very simple sollution in combination with
multithreading.
When I do miss something, tell me what I miss?
Cor
> Hi everyone,
> We're developing an application to capture data from several serial
> ports, store in a database, and (optionally) forward on using FTP.
>
> Each serial port is being processed in a thread, so that capture of
> data can continue if the UI is blocked with a modal dialg, for
> example.
>
> I would like each thread to be able to pass any FTP work to a
> dedicated thread, so that its data capture is not interrupted if the
> FTP takes a long time.
>
> So what I'm looking at is:
>
> main thread
> --- capture thread A
> --- capture thread B
> --- ftp thread
>
> The big question is: how do I pass the ftp data from threads A/B to
> the FTP thread?
>
> In a similar vein, am I going to have problems if thread A and thread
> B are both writing to my MSDE database?
>
> The other question, of course, is whether there's a better way to do
> it!
>
> Any pointers greatly appreciated!
>
> Thanks,
>
> James
- Next message: Cor Ligthert: "Re: Handling windows scroll"
- Previous message: mwazir: "Re: Excel and vb.net"
- In reply to: James Lavery: "Inter-thread communication to pass a job to another thread"
- Next in thread: Charles Law: "Re: Inter-thread communication to pass a job to another thread"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|