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

ItemList trickyness #9

Open
msiebuhr opened this issue Sep 23, 2015 · 0 comments
Open

ItemList trickyness #9

msiebuhr opened this issue Sep 23, 2015 · 0 comments

Comments

@msiebuhr
Copy link
Contributor

Not 100% sure, but this flow seems to break things for me:

data := make([]podio.Item, 0)
var items podio.ItemList
podio.FetchItems(... &items)
for _, item := items.Items {
    data = append(data, item)
}
// data[0].Id = ITEM_0

// Fetch a new batch of data, say at offset 500
podio.FetchItems(... &items)
for _, item := items.Items {
    data = append(data, item)
}
// data[0].Id = ITEM_500
// data[500].Id = ITEM_500

Internally, it shuffles around the pointers in the data-structure handed to it, leading to weird races in parallel process code...

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