05-23-2024, 11:15 PM
(05-23-2024, 10:05 PM)DSMan195276 Wrote:If two programs could share the memory pointers for certain variables, that would be the fastest communication. Of course that opens up other problems, but if it was a bona-fide feature built into and managed by QB64PE, kind of like shared global variables - super global variables, ie shared across 2 or more processes, that might be kinda useful! I'm nowhere near as technical or knowledgable as the other folks here, so it's entirely possible it's not possible or a Bad Idea, but I figure it's worth asking about...(05-23-2024, 08:09 PM)SMcNeill Wrote: They set the flag for who has control, and skip doing anything unless they have control... Then when they're finished writing, they set the flag so the other program now has control to read.I mean you didn't really solve the underlying problem, you simply avoided the race by adding a _Delay .1
That said, one-way commutation with three states like you're doing has some potential. I'd still be concerned about caching, especially on Linux and Mac OS where we make use of the C++ file streams, but overall I think it's ok.