Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Over the shoulder supervision is more a need of the manager than the programming task.


devel / comp.lang.clipper.visual-objects / Mult thread.. sample and discussion please

SubjectAuthor
* Mult thread.. sample and discussion pleasePhil McGuinness
+- Re: Mult thread.. sample and discussion pleaseJamal
`* Re: Mult thread.. sample and discussion pleaseWolfgang Riedmann
 `* Re: Mult thread.. sample and discussion pleasePhil McGuinness
  +- Re: Mult thread.. sample and discussion pleasedlzc
  `* Re: Mult thread.. sample and discussion pleaseWolfgang Riedmann
   `- Re: Mult thread.. sample and discussion pleaseFranz Rachbauer

1
Mult thread.. sample and discussion please

<b1cb965f-2b77-4471-9b50-e7935c58bb91n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1029&group=comp.lang.clipper.visual-objects#1029

  copy link   Newsgroups: comp.lang.clipper.visual-objects
X-Received: by 2002:ad4:5962:: with SMTP id eq2mr21037526qvb.24.1643683488928;
Mon, 31 Jan 2022 18:44:48 -0800 (PST)
X-Received: by 2002:ad4:5be7:: with SMTP id k7mr20704789qvc.9.1643683488778;
Mon, 31 Jan 2022 18:44:48 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.clipper.visual-objects
Date: Mon, 31 Jan 2022 18:44:48 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=220.233.174.33; posting-account=DLsZHwoAAADZjAB6-BmLUbnomrA9rubZ
NNTP-Posting-Host: 220.233.174.33
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b1cb965f-2b77-4471-9b50-e7935c58bb91n@googlegroups.com>
Subject: Mult thread.. sample and discussion please
From: sherlocksoftware@gmail.com (Phil McGuinness)
Injection-Date: Tue, 01 Feb 2022 02:44:48 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 13
 by: Phil McGuinness - Tue, 1 Feb 2022 02:44 UTC

Have a VO GUI app runs lots of things via Dispatch.. but one of those things needs a good hour to run. I do not want wait in current processes for this.. and happy to have background event running. Realise on single thread cannot get this to work.. it wants that length job to finish before moving on.

So CreateVOThread and have a function with the work to be done. Thought start this and do other things and that thread will finish.. until needed again.

Can I do this with simple to CreateVOthread with the function and the main thread is processing again. I did not see this.. and confused.

Any help welcome

Re: Mult thread.. sample and discussion please

<stc8f0$1qar$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1030&group=comp.lang.clipper.visual-objects#1030

  copy link   Newsgroups: comp.lang.clipper.visual-objects
Path: i2pn2.org!i2pn.org!aioe.org!usMzckGswq/a27BPojtwGg.user.46.165.242.75.POSTED!not-for-mail
From: nospam@example.com (Jamal)
Newsgroups: comp.lang.clipper.visual-objects
Subject: Re: Mult thread.. sample and discussion please
Date: Tue, 1 Feb 2022 16:24:50 -0500
Organization: Aioe.org NNTP Server
Message-ID: <stc8f0$1qar$1@gioia.aioe.org>
References: <b1cb965f-2b77-4471-9b50-e7935c58bb91n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="59739"; posting-host="usMzckGswq/a27BPojtwGg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Jamal - Tue, 1 Feb 2022 21:24 UTC

Never used VO Threads! Check out discussions at:
https://groups.google.com/g/comp.lang.clipper.visual-objects/search?q=CreateVOthread%20

You may something helpful.

Jamal

On 1/31/2022 9:44 PM, Phil McGuinness wrote:
> Have a VO GUI app runs lots of things via Dispatch.. but one of those things needs a good hour to run. I do not want wait in current processes for this.. and happy to have background event running. Realise on single thread cannot get this to work.. it wants that length job to finish before moving on.
>
> So CreateVOThread and have a function with the work to be done. Thought start this and do other things and that thread will finish.. until needed again.
>
> Can I do this with simple to CreateVOthread with the function and the main thread is processing again. I did not see this.. and confused.
>
> Any help welcome

Re: Mult thread.. sample and discussion please

<j5umckFb0tdU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1031&group=comp.lang.clipper.visual-objects#1031

  copy link   Newsgroups: comp.lang.clipper.visual-objects
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: wriedmann@gmail.com (Wolfgang Riedmann)
Newsgroups: comp.lang.clipper.visual-objects
Subject: Re: Mult thread.. sample and discussion please
Date: Wed, 2 Feb 2022 07:24:20 +0100
Lines: 33
Message-ID: <j5umckFb0tdU1@mid.individual.net>
References: <b1cb965f-2b77-4471-9b50-e7935c58bb91n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
X-Trace: individual.net Tool+2r596N5/RX7bHQi2wJ2ofwkbFReHRgIJp3eWA8RlbNVo=
Cancel-Lock: sha1:CUy3008R6TKfJJ/3N4axpdnK77s=
User-Agent: XanaNews/1.18.1.6
 by: Wolfgang Riedmann - Wed, 2 Feb 2022 06:24 UTC

Hi Phil,

as Jamal wrote: never use threads in VO.

You can use them in X#, but if you have longer operations it may be
better to move them to background Windows services on some dedicated
machine and run them when the VO application sets a flag in the
database or writes some flag file.

Wolfgang

Phil McGuinness wrote:

> Have a VO GUI app runs lots of things via Dispatch.. but one of
> those things needs a good hour to run. I do not want wait in current
> processes for this.. and happy to have background event running.
> Realise on single thread cannot get this to work.. it wants that
> length job to finish before moving on.
>
> So CreateVOThread and have a function with the work to be done.
> Thought start this and do other things and that thread will finish..
> until needed again.
>
> Can I do this with simple to CreateVOthread with the function and the
> main thread is processing again. I did not see this.. and confused.
>
> Any help welcome

--

Re: Mult thread.. sample and discussion please

<c90fe8f2-f4d3-47a9-8b39-9214c79cb1c3n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1032&group=comp.lang.clipper.visual-objects#1032

  copy link   Newsgroups: comp.lang.clipper.visual-objects
X-Received: by 2002:ac8:594b:: with SMTP id 11mr21865780qtz.463.1643793345399;
Wed, 02 Feb 2022 01:15:45 -0800 (PST)
X-Received: by 2002:a05:6214:2524:: with SMTP id gg4mr26099653qvb.27.1643793345189;
Wed, 02 Feb 2022 01:15:45 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.clipper.visual-objects
Date: Wed, 2 Feb 2022 01:15:45 -0800 (PST)
In-Reply-To: <j5umckFb0tdU1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=220.233.174.33; posting-account=DLsZHwoAAADZjAB6-BmLUbnomrA9rubZ
NNTP-Posting-Host: 220.233.174.33
References: <b1cb965f-2b77-4471-9b50-e7935c58bb91n@googlegroups.com> <j5umckFb0tdU1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c90fe8f2-f4d3-47a9-8b39-9214c79cb1c3n@googlegroups.com>
Subject: Re: Mult thread.. sample and discussion please
From: sherlocksoftware@gmail.com (Phil McGuinness)
Injection-Date: Wed, 02 Feb 2022 09:15:45 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 16
 by: Phil McGuinness - Wed, 2 Feb 2022 09:15 UTC

Jamal, Wolfgang

Have it working ut in crashes it seems randomly.
I am not sure is DBServer thread safe.
I simply want a subset of data, open as DBSERVER and do some slow process to REST service.
The crash seems relate totally to a field in Dbserver.

With CreateVOThread is the a requirement to lock memory in a certain way.
Could not find many samples.

Did not want to write another whole service when my system is a Service.
Have not got that far... it crashes in the IDE.

Anybody elese experiences, pointers, gotta yas and frustrations.
Little clues help

Phil

Re: Mult thread.. sample and discussion please

<2dacebdc-eb85-41a5-8cae-898075fd3c97n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1033&group=comp.lang.clipper.visual-objects#1033

  copy link   Newsgroups: comp.lang.clipper.visual-objects
X-Received: by 2002:a05:620a:2804:: with SMTP id f4mr19125670qkp.462.1643811738381;
Wed, 02 Feb 2022 06:22:18 -0800 (PST)
X-Received: by 2002:a05:6214:d6a:: with SMTP id 10mr26606087qvs.59.1643811738192;
Wed, 02 Feb 2022 06:22:18 -0800 (PST)
Path: i2pn2.org!rocksolid2!news.neodome.net!2.us.feeder.erje.net!feeder.erje.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.clipper.visual-objects
Date: Wed, 2 Feb 2022 06:22:17 -0800 (PST)
In-Reply-To: <c90fe8f2-f4d3-47a9-8b39-9214c79cb1c3n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=68.107.209.13; posting-account=7bF0GwoAAABMFHX6V4fON4-1F6LFJ834
NNTP-Posting-Host: 68.107.209.13
References: <b1cb965f-2b77-4471-9b50-e7935c58bb91n@googlegroups.com>
<j5umckFb0tdU1@mid.individual.net> <c90fe8f2-f4d3-47a9-8b39-9214c79cb1c3n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2dacebdc-eb85-41a5-8cae-898075fd3c97n@googlegroups.com>
Subject: Re: Mult thread.. sample and discussion please
From: dlzc1@cox.net (dlzc)
Injection-Date: Wed, 02 Feb 2022 14:22:18 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 24
 by: dlzc - Wed, 2 Feb 2022 14:22 UTC

Dear Phil McGuinness:

On Wednesday, February 2, 2022 at 2:15:46 AM UTC-7, Phil McGuinness wrote:
> Jamal, Wolfgang
>
> Have it working [but it] crashes it seems randomly. I am not sure is
> DBServer thread safe. I simply want a subset of data, open as
> DBSERVER and do some slow process to REST service.
> The crash seems relate totally to a field in Dbserver.

Imagine a "blind" "vanilla" VO application, that looks for an "instruction file" in its working directory, renames it to an "in process" name (assuming it gets to, file is not locked or still being written to), does what is in the instruction file, and then renames it to a "completed" name. It can be run at startup of the machine, as others have suggested.

VO is "free and easy" with stacks, and creating and freeing memory within its domain. So you are NOT going to have success, unless you change how you code to prevent it doing this, possibly even accessing data files will be impossible, as a "thread". Let it run as a standalone.

You can check status on assigned tasks, by checking the file names, and dates.

David A. Smith (not a VO programmer, but an earlier sister programmer)

Re: Mult thread.. sample and discussion please

<j6a40tFp9eU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1034&group=comp.lang.clipper.visual-objects#1034

  copy link   Newsgroups: comp.lang.clipper.visual-objects
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: wriedmann@gmail.com (Wolfgang Riedmann)
Newsgroups: comp.lang.clipper.visual-objects
Subject: Re: Mult thread.. sample and discussion please
Date: Sun, 6 Feb 2022 15:24:28 +0100
Lines: 47
Message-ID: <j6a40tFp9eU1@mid.individual.net>
References: <b1cb965f-2b77-4471-9b50-e7935c58bb91n@googlegroups.com> <j5umckFb0tdU1@mid.individual.net> <c90fe8f2-f4d3-47a9-8b39-9214c79cb1c3n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
X-Trace: individual.net WMQwGTMSbEjZ/JeHrbaZcwtplKw5wsovo0NzG1EUIhOZAzANM=
Cancel-Lock: sha1:sR3AJVYlpdSnaRrKpZjjHvSqtLU=
User-Agent: XanaNews/1.18.1.6
 by: Wolfgang Riedmann - Sun, 6 Feb 2022 14:24 UTC

Hi Phil,

the VO development team has confirmed several times that the VO garbage
collector is not thread safe.

So, if you use threads, you cannot use dynamically allocated variables
like strings and objects.

The only possibility I see for you is to migrate to X#. Robert has done
miracles to make the runtime thread safe, and there every thread has
its own runtime state with its own settings.
So your main thread can have SetDeleted set to on, and one of your
spawned threads can have set it to off. Even the workarea numbers are
per thread.

I can confirm you that the DBServer class in X# is thread safe as I use
it in WPF applications, and they need to be multithreaded to have a
responsive GUI.

Wolfgang

Phil McGuinness wrote:

> Jamal, Wolfgang
>
> Have it working ut in crashes it seems randomly.
> I am not sure is DBServer thread safe.
> I simply want a subset of data, open as DBSERVER and do some slow
> process to REST service. The crash seems relate totally to a field
> in Dbserver.
>
> With CreateVOThread is the a requirement to lock memory in a certain
> way. Could not find many samples.
>
> Did not want to write another whole service when my system is a
> Service. Have not got that far... it crashes in the IDE.
>
> Anybody elese experiences, pointers, gotta yas and frustrations.
> Little clues help
>
> Phil

--

Re: Mult thread.. sample and discussion please

<str2oi$3pu$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1035&group=comp.lang.clipper.visual-objects#1035

  copy link   Newsgroups: comp.lang.clipper.visual-objects
Path: i2pn2.org!i2pn.org!aioe.org!Y5HFE2ceU1zs88qM2K1fzQ.user.46.165.242.91.POSTED!not-for-mail
From: office@rachbauer.org (Franz Rachbauer)
Newsgroups: comp.lang.clipper.visual-objects
Subject: Re: Mult thread.. sample and discussion please
Date: Mon, 7 Feb 2022 13:19:27 +0100
Organization: Aioe.org NNTP Server
Message-ID: <str2oi$3pu$1@gioia.aioe.org>
References: <b1cb965f-2b77-4471-9b50-e7935c58bb91n@googlegroups.com>
<j5umckFb0tdU1@mid.individual.net>
<c90fe8f2-f4d3-47a9-8b39-9214c79cb1c3n@googlegroups.com>
<j6a40tFp9eU1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="3902"; posting-host="Y5HFE2ceU1zs88qM2K1fzQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:91.0) Gecko/20100101
Thunderbird/91.5.1
X-Antivirus-Status: Clean
X-Antivirus: Avast (VPS 220206-16, 6.2.2022), Outbound message
X-Notice: Filtered by postfilter v. 0.9.2
 by: Franz Rachbauer - Mon, 7 Feb 2022 12:19 UTC

Why not do this thread in a sep app running on taskbar or in a service?
Regards, Franz

Am 06.02.2022 um 15:24 schrieb Wolfgang Riedmann:
> Hi Phil,
>
> the VO development team has confirmed several times that the VO garbage
> collector is not thread safe.
>
> So, if you use threads, you cannot use dynamically allocated variables
> like strings and objects.
>
> The only possibility I see for you is to migrate to X#. Robert has done
> miracles to make the runtime thread safe, and there every thread has
> its own runtime state with its own settings.
> So your main thread can have SetDeleted set to on, and one of your
> spawned threads can have set it to off. Even the workarea numbers are
> per thread.
>
> I can confirm you that the DBServer class in X# is thread safe as I use
> it in WPF applications, and they need to be multithreaded to have a
> responsive GUI.
>
> Wolfgang
>
>
> Phil McGuinness wrote:
>
>> Jamal, Wolfgang
>>
>> Have it working ut in crashes it seems randomly.
>> I am not sure is DBServer thread safe.
>> I simply want a subset of data, open as DBSERVER and do some slow
>> process to REST service. The crash seems relate totally to a field
>> in Dbserver.
>>
>> With CreateVOThread is the a requirement to lock memory in a certain
>> way. Could not find many samples.
>>
>> Did not want to write another whole service when my system is a
>> Service. Have not got that far... it crashes in the IDE.
>>
>> Anybody elese experiences, pointers, gotta yas and frustrations.
>> Little clues help
>>
>> Phil
>
>
>

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor