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

wrap data source use/unuse in transaction so we are sure of the unuse #491

Merged

Conversation

Projects
None yet
3 participants
@mpapis
Copy link
Member

commented Nov 3, 2014

extracted from #481

@bobthecow

This comment has been minimized.

Copy link
Member

commented Nov 3, 2014

👍

@@ -299,6 +299,14 @@ def self.config_filename_for_cwd

private

# make sure datasources are unloaded properly even on trouble

This comment has been minimized.

Copy link
@ddfreyne

ddfreyne Nov 3, 2014

Member

I’d reword this. How about:

Executes the given block, making sure that the datasources are available for the duration of the block.

Mentioning the “trouble” bit is unnecessary since it is clear enough that this method uses the idiomatic Ruby resource cleanup style.

This comment has been minimized.

Copy link
@ddfreyne

ddfreyne Nov 3, 2014

Member

And yes, I do care about documentation :)

@ddfreyne

This comment has been minimized.

Copy link
Member

commented Nov 3, 2014

Apart from comment, sweet 👍

@mpapis mpapis force-pushed the mpapis:features/ensure_datasources_unuse branch from d52b6fe to fc7d1e5 Nov 3, 2014

@ddfreyne

This comment has been minimized.

Copy link
Member

commented Nov 3, 2014

I’d leave out the “and are always unused” — it’s pretty confusing.

@mpapis mpapis force-pushed the mpapis:features/ensure_datasources_unuse branch from fc7d1e5 to b281822 Nov 3, 2014

@mpapis

This comment has been minimized.

Copy link
Member Author

commented Nov 3, 2014

updated

ddfreyne added a commit that referenced this pull request Nov 3, 2014

Merge pull request #491 from mpapis/features/ensure_datasources_unuse
Wrap data source #use/#unuse in transaction

@ddfreyne ddfreyne merged commit 684604f into nanoc:release-3.7.x Nov 3, 2014

1 check was pending

continuous-integration/travis-ci The Travis CI build is in progress
Details
@ddfreyne

This comment has been minimized.

Copy link
Member

commented Nov 3, 2014

Thanks!

@mpapis

This comment has been minimized.

Copy link
Member Author

commented Nov 3, 2014

my pleasure :)

@bobthecow

This comment has been minimized.

Copy link
Member

commented Nov 3, 2014

I’d leave out the “and are always unused” — it’s pretty confusing.

Maybe "and are released after completion" or something?

@ddfreyne

This comment has been minimized.

Copy link
Member

commented Nov 3, 2014

Maybe "and are released after completion" or something?

They’re not necessarily released, since this uses reference counting.

@bobthecow

This comment has been minimized.

Copy link
Member

commented Nov 3, 2014

gotcha. okay. leave it out then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.