There is not best way for that, because the idea is busted in itself.
What is the best way to manage 100 programmers to work on a single computer? Sorry, you just need more computers.
I do not remember already how to do that in MFC, but in WinAPI one must do something along the lines of:
BOOL rv;
MSG msg = {};
while (0 != (rv = GetMessage(&msg, 0, 0, 0)))
{
...
There is a technique called PCOW (partial copy-on-write), it works for any kind of recursive data structures (lists, trees). It provides serializable operations and zero-overhead 100% scalable...
> Is the volatile cast only to ensure the compiler generates are real load/store? If so, would it be "better" to use some sort inline assembly trick to ensure the load/store is generated?
> But in the video at around 24:22, it sounds like he was only referring to compiler re-ordering - in that the compiler can not reorder volatile accesses relative to other volatile access - but the...
>> Volatile accesses can't be reordered only relative to other volatile accesses.
> Absolutely, and that's what I intended. I should of been more clear (via the text in red). Thanks for pointing...
> From a standards perspective, volatile accesses are more like a full fence - because the compiler can't move any volatile load/store instruction before/after another.
First of all, user mode "threads" (fibers) are not actually threads in the sense that they do not allow one to utilize parallel hardware. They are useful only as a replacement for explicit state...
Hannes, I believe CreateThread() is just not guaranteed to work in VB. Isn't it? Your programming system provides an API for thread creation, so use it. For example, in Visual C++ CreateThread() is...