Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Never make anything simple and efficient when a way can be found to make it complex and wonderful.


devel / comp.arch.embedded / Re: A fileevent question

SubjectAuthor
* A fileevent questionHelmut Giese
`- Re: A fileevent questionHelmut Giese

1
A fileevent question

<49jstilsf0a26l4s504gnbl5n9819ccdcb@4ax.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1762&group=comp.arch.embedded#1762

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: hgi...@ratiosoft.com (Helmut Giese)
Newsgroups: comp.arch.embedded
Subject: A fileevent question
Date: Tue, 27 Feb 2024 22:27:39 +0100
Organization: ratiosoft
Lines: 22
Message-ID: <49jstilsf0a26l4s504gnbl5n9819ccdcb@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="7a84c729b6cab129fd777dabbb579736";
logging-data="3602699"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kVgRhhAIR/5ARZVlmgWQ9"
Cancel-Lock: sha1:IEqK5CS/iTtKJjYy16vQAEbGU0k=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
 by: Helmut Giese - Tue, 27 Feb 2024 21:27 UTC

Hello out there,
just asking for inspiration.
I have a simulation which executes commands - everything ok.
But now the program should also communicate with external hardware via
a serial connection and that is the problem:
- I don't want to block waiting for an answer since I also have a GUI.
- Turning to file events I now have the problem that the simulation
cannot continue before a particular call to the hardware is complete:
It may ask the hardware for a particular value which is to be used in
the next command.

So my question is: How do I block execution of the simulation part
until an answer arrives /without/ blocking the whole app?
- An attempt to use 'vwait' resulted in the whole app freezing.
- A separate thread would probably solve this problem.
- A coroutine would instinctively be a "lighter" solution but I have
so far never used coroutines and didn't find an example which seemed
to "fit" my situation.
- Any other way ...

Any idea, tip or link will be greatly appreciated
Helmut

Re: A fileevent question

<82lstid520jr0pefn5t6o5um4r2ib8rccg@4ax.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1763&group=comp.arch.embedded#1763

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!news.chmurka.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: hgi...@ratiosoft.com (Helmut Giese)
Newsgroups: comp.arch.embedded
Subject: Re: A fileevent question
Date: Tue, 27 Feb 2024 22:30:15 +0100
Organization: ratiosoft
Lines: 3
Message-ID: <82lstid520jr0pefn5t6o5um4r2ib8rccg@4ax.com>
References: <49jstilsf0a26l4s504gnbl5n9819ccdcb@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="7a84c729b6cab129fd777dabbb579736";
logging-data="3602833"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+fqzIT62UzdrvCPY0i7q6A"
Cancel-Lock: sha1:OWFI4SX9D4G+IMfgJiaQ2Y/iukg=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
 by: Helmut Giese - Tue, 27 Feb 2024 21:30 UTC

Sorry,
wrong news group.
Helmut

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor