Use scope-based lock guard in DataSource