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
onReady seems to be a private member, how can i use it #239
Comments
I may figure out why CacheLib/cachelib/allocator/Handle.h Line 302 in 195fc7a
|
@shuyanzhu: yeah you're right. We have actually changed our thinking since the comment is written. We now think everyone should convert a "not-ready" item-handle to a SemiFuture as that's a pretty standard way of dealing with async now (and also plays well with folly's implementation of coroutine) we'll update the documentation |
Summary: We no longer let users directly attach a callback to onReady(), which is unsafe due to thread handle count. This caused some confusion in the PR: #239 This diff cleans up the comments Reviewed By: jaesoo-fb Differential Revision: D46446698 fbshipit-source-id: fb26a7a731a80cf7f5158b8f2ebaa261bb72b62b
I use bthread in my code, which is stackful coroutine like folly/fiber. In such cases, i think |
@shuyanzhu: I suppose you cannot use folly coroutine? You can hack it for now by making onReady() public on your end, and adjust the thread local count yourself for now. Are you doing this for a production system, or for research? |
I use cachelib in a production system so i cannot use folly coroutine. Yeah, i have made onRead public. |
BTW, i can also new a excutor to complete folly::SemiFuture which had defered bthread's |
@therealgymmy I wonder if 'onReady' will be re-exposed to users. |
@shuyanzhu: yeah I filed a ticket for it. We'll think about a better way to expose this. You're right that not everyone will be using folly's version of executors. |
https://github.com/facebook/CacheLib/blob/195fc7a3f467058326af267809a7ec8589d6f843/website/docs/Cache_Library_User_Guides/HybridCache.md?plain=1#LL66C25-L66C33
The text was updated successfully, but these errors were encountered: