Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #5156

Re: Multi threading a few more questions

From Martin <spam@spam.spam>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Multi threading a few more questions
References <w5Rdt.114261$Pj4.60689@fx14.fr7> <5177ecfb$0$63280$c3e8da3$3a1a2348@news.astraweb.com> <EISdt.7907$Ra4.1541@fx19.fr7> <51785cb6$0$63676$c3e8da3$14a0410e@news.astraweb.com>
Message-ID <2wret.76596$9T.45281@fx22.fr7> (permalink)
Date 2013-04-26 10:10 +0100

Show all headers | View raw


Well I have just had a big problem dropped on me

CSocket lib for Xbase++ is rather expensive, so I have even more coding 
to do, the scanner will now need to be in VO as well, and I will need to 
use your serial lib.

I want to use it on a SLE with CRLF ending each barcode, then pass the 
data out.

We will have a few (1 to 5 scanners) sitting there monitoring their 
barcode readers, sending data via a DBF, they will use a csocket to wake 
up the processor, if the processor is handling a loading process, it 
will kick off a thread to monitor the loading and then play a WAV saying 
loading complete. Done this as a single .exe with Xbase but I need to 
add a lot of code from VO hence the rewrite.

Thanks

Martin

On 24/04/2013 23:29, Ginny Caughey wrote:
> Good to hear the serial class is helpful. I still use it in production
> today.
>
> Ginny
>
> "Martin"  wrote in message news:EISdt.7907$Ra4.1541@fx19.fr7...
>
> Separate workareas - I am careful about that
>
> The current system is a single executable, I am just changing dialect to
> one with an IDE and strict typing as well as a few thousand lines of
> code I want to use, the older application was my first working windows
> program, and was literally a recompile of Clipper with a GUI bolted on,
> multi threading added on more recently, I will do a collectforced before
> starting the thread and after clearing it.
>
> The Alaska version used 4 or 5 strings, and an array.
>
> It is pretty hard coding a window without an IDE!
>
> Separate .exes looks messy on the screen and feels more like a bodge.
>
> BTW I am using your serial class as an instruction aid for multi thread
> design.
>
>
> On 24/04/2013 15:32, Ginny Caughey wrote:
>> You might be able to get away with this if none of your data types are
>> garbage collectible (no strings, usuals, etc.) and if you use separate
>> workareas in each thread for accessing the DBF files. I don't recommend
>> it but I have used this approach successfully many years ago. Today I'd
>> just use a separate app that could be kicked off by the main app. Why is
>> this not a possibility for you?
>>
>> Ginny
>>
>> "Martin"  wrote in message news:w5Rdt.114261$Pj4.60689@fx14.fr7...
>>
>> I have written the framework for a processing engine, it will use a
>> couple of threads to do alternate data access while the main application
>> is busy. A test calling a simple set did 2600 (first I saw after 5000
>> lines in my log file) calls before I quitted the program.
>>
>> The idea works perfectly well in the more simpler predecessor written in
>> Xbase++.
>>
>> I will kick off a thread, it will do its check while the rest of the
>> system carries on its work, then return when finished.
>>
>> While running it will need to access about 10 DBFs via ADS, take a
>> couple of seconds to access it and decide on an answer, then if OK tell
>> the user via a loudspeaker that what they are loading is full.
>>
>> So there is a risk of the garbage collector kicking in on the thread, is
>> this dangerous?
>>
>> Thanks
>>
>> Martin
>

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Multi threading a few more questions Martin <spam@spam.spam> - 2013-04-24 14:28 +0100
  Re: Multi threading a few more questions "Ginny Caughey" <gcaughey@online.hotmail.com> - 2013-04-24 10:32 -0400
    Re: Multi threading a few more questions Martin <spam@spam.spam> - 2013-04-24 16:18 +0100
      Re: Multi threading a few more questions "Ginny Caughey" <gcaughey@online.hotmail.com> - 2013-04-24 18:29 -0400
        Re: Multi threading a few more questions Martin <spam@spam.spam> - 2013-04-26 10:10 +0100
          Re: Multi threading a few more questions dlzc <dlzc1@cox.net> - 2013-04-26 07:34 -0700
            Re: Multi threading a few more questions Martin <spam@spam.spam> - 2013-04-26 16:25 +0100
    Re: Multi threading a few more questions Martin <spam@spam.spam> - 2013-04-24 16:18 +0100

csiph-web