| ▲ | tombert 4 hours ago | |||||||
Sure but that's true of threads as well. The advantage of having these threadprocs is that there can be zero-copy sharing, which isn't necessarily bad but if they aren't copied then B could screw up A's stuff. If you're ok with threads keeping their own memory and not sharing then pthreads already do that competently without any additional library. The problem with threads is that there's a shared address space and so thread B can screw up thread A's memory and juggling concurrency is hard and you need mutexes. Processes give isolation but at the cost of some overhead and IPC generally requiring copying. I'm just not sure what this actually provides over vanilla pthreads. If I'm in charge of ensuring that the threadprocs don't screw with each other then I'm not sure this buys me anything. | ||||||||
| ▲ | saidnooneever 3 hours ago | parent [-] | |||||||
of they are zero copy sharing essentially they have both access to same data and this they can screw eachother up. you'd need to design the programs around this... which might aswell make u just use shared memory. without locking if multiple of these things would read or write to the same place the CPU will not appreciate it... u might read or write partials or garbage etc.? still a fun little project but i dont see any use case personally. (perhaps the author has a good one, its not impossible) | ||||||||
| ||||||||