nezuo / lapis

A DataStore abstraction library for Roblox
https://nezuo.github.io/lapis/
MIT License
55 stars 10 forks source link

Documents should not be able to load after `game:BindToClose` #37

Closed nezuo closed 5 months ago

nezuo commented 6 months ago

If a document loads after game:BindToClose it won't be closed unless the user is closes it sometime after manually (for example PlayerRemoving).

The question is, how should it stop the loading?

ProfileService just returns nil from ProfileStore:LoadProfileAsync, however, I think infinitely yielding is the best option. This is because the other 2 solutions could cause user code to error. This shouldn't result in an error because it's not a bug. It would be unfortunate if a user saw an error and was worried about it.