Open jhellerstein opened 12 years ago
Without major changes, this would be impossible to do statically (since using sync_do is only necessary when the Bud instance is currently running asynchronously).
Enforcing it at runtime would be possible, but there are currently lots of different ways to get at Bud-private state (e.g., collection names, Bud methods, etc.), so we'd need to add checks to a lot of places.
We could easily guard the collection names at least, which is the common case.
It's not good that we expect users to say sync_do in their Ruby code, but we don't enforce it when it's required.