Skip to content
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

Use uncompiled ydn-db #1

Open
greenyouse opened this issue Mar 11, 2015 · 0 comments
Open

Use uncompiled ydn-db #1

greenyouse opened this issue Mar 11, 2015 · 0 comments

Comments

@greenyouse
Copy link
Owner

Same issue as greenyouse/ydn-cljs#1

There is trouble retrieving items from clientside storage because ydn-db and IndexedDB are asynchronous. When initializing a DBAtom, the items from clientside storage need to be fetched and reset as the value of the DBAtom. Because the clientside lookup is asynchronous, we hit a race condition and the DBAtom stays nil.

(I'm aware that https://github.com/greenyouse/pldb-cache/blob/master/src/pldb_cache/core.cljs#L139 is really dumb. It was just where I decided to give up after trying it a bunch of different ways 😦 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant