C++ Logo

std-proposals

Advanced search

Re: Remove infinite loop UB

From: Tony V E <tvaneerd_at_[hidden]>
Date: Sat, 09 May 2020 09:18:21 -0400
The basic idea is a program that looks like:

int main()
{
   setupSignalHandlers();
   for(;;)
       ;
}

The real work of the program happens in the signal handlers.
Or interrupts. Etc.

Nothing happens on the main thread. But it needs to be running for the signal handlers to have somewhere to run. 

We could have a special function for this:

   for (;;)
      std::magic_pretend_im_doing_something();

Not sure how we specify it though.


Sent from my BlackBerry portable Babbage Device
From: Dmitry via Std-Proposals
Sent: Saturday, May 9, 2020 8:53 AM
To: sotrdg sotrdg via Std-Proposals
Reply To: std-proposals_at_[hidden]
Cc: Dmitry
Subject: Re: [std-proposals] Remove infinite loop UB

Can you please explain this in more detail?

> SNES Game that's finished but needs still draw/redraw stuff

Received on 2020-05-09 08:21:24