New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added classes and unit tests for local_file, orangefs_file and pxfs_file. #1267
Conversation
As it turns out, |
It seems detach() is abandoning the ownership of the memory so that it will not get destroyed. Then for boost 1.55.0 and older, is there a way to get out of the intrusive_ptr's control? I tried to use get() and then reset(), not working. Another way is to modify the intrusive_ptr_release function so that it deletes the memory when count==-1, however, it seems nasty.... |
After thinking some more about this I realized that even the current code is not 100% accurate. The scheme we currently employ is:
This will usually lead leak the Solving this problem is not trivial as we have to ensure that the data is released only after both functions are done using it. |
When calling detach(), the reference count is still 1 and then the intrusive_ptr has abandoned the ownership, thus leaving the data pointer as an orphan and never get deleted. Is this where the problem is? The foo() function need to return future of the promise inside data, so basically after foo() finishes, we only have access to the future, not the data itself. I am wondering how the data struct can be released. How did we solve this problem in the client/server model of the hpx component? It should also face the same problem where one action needs to return a future. I remember that hpx has garbage collection, is it right? |
Updated the diskperf example using these file classes. |
604ce0d
to
ded7346
Compare
…ile. All io operations are executed on io-thread. local_file and orangefs_file are using server/client model to implement asynchronism while pxfs_file uses the pxfs asynchronous APIs.
ded7346
to
c5d0d74
Compare
All if this has been incorporated into the branch pxfs (https://github.com/STEllAR-GROUP/hpx/tree/pxfs). We will continue developing things there. |
Provide asynchronous IO functions for local files, OrangeFS files and PXFS files. All io operations are executed on separate io-thread. local_file and orangefs_file are using server/client model to implement asynchronism while pxfs_file uses the pxfs asynchronous APIs.