Re: Inter-thread communication to pass a job to another thread

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Cor Ligthert (notfirstname_at_planet.nl)
Date: 05/26/04


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



Relevant Pages

  • Inter-thread communication to pass a job to another thread
    ... We're developing an application to capture data from several serial ... ports, store in a database, and forward on using FTP. ... Each serial port is being processed in a thread, ... B are both writing to my MSDE database? ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Major new online resource: "Medieval Lands"
    ... If you are back that's Charles Cawley's biggest achievment. ... Peter Stewart escreveu: ... to return in support of Douglas Richardson. ... I have not looked at the Hull Project database and know nothing about it ...
    (soc.genealogy.medieval)
  • Re: Is This Possible ... ?
    ... To be honest I'm not really looking at the FTP protocol simply because as ... knowing those details just for the sake of uploading picture files - plus ... the www folder is the root folder and all web pages need to be placed ... would allow a user to send a picture file to an Access database in this ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Is This Possible ... ?
    ... Its how to reference the target file system and use the FTP ... upload image files. ... unfortunately the servers web root www folder only allows READ and EXECUTE ... allow a user to send a picture file to an Access database in this folder, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Text File is changing to an XML File
    ... OPENROWSET does only work with UNC path names that are accessible from ... No HTTP or FTP. ... Inside the database look at OpenXML or the nodesmethod. ... file to get the XML file, apply an XSLT to it that produces the CSV format ...
    (microsoft.public.sqlserver.xml)