added parallel to promise. Right now it compiles, but the validity has not been verified
It is extremely ugly right now, will work on fixing the underlying lib calls
Also need to move everything into unique pointers to prevent leak, and setup barriers between C++ and C code