Sorry... I have NOT done mutch MS-Window programming. This since I
for about 20 odd years ago noticed that sockets (file descriptors)
is the ONLY safe way to do communications by. (select, poll or kernel-queue etc).
And you should only have one place in your application for dispatching
events.
ALL other communications mechanism tend to lock upp your application in one
way or the other.
And since your communicate over a socket you can as well design
a good protocol to communicate by. And then it is easy to split the
application into serveral parts. You know like client/servers. And why
not many client-servers.
If you need a large memory segment you can use mmap() to have larger
memory area.
And you can study this in http://www.ibm.com/developerworks/aix/library/au-spunix_sharedmemory/
The process in Unix *is* the multitasking abstraction.
You must ask what event notification mechanisms you have
between threads!
Then read manual pages for kqueue() in BSD...
https://www.freebsd.org/cgi/man.cgi?query=kqueue
Were can i find something like this for threads?
And yes. My programs are a little bit more complicated - but they don't
hangs...