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

Ensure when closing, to explicitly close data blocks #533

Merged
merged 3 commits into from
Aug 17, 2018
Merged

Ensure when closing, to explicitly close data blocks #533

merged 3 commits into from
Aug 17, 2018

Conversation

stscieisenhamer
Copy link

@stscieisenhamer stscieisenhamer commented Aug 16, 2018

This is to close out references to memory-mapped arrays that,
in the current context, not associated with a file. The Block._memmapped
is False but the .data is a memory-mapped array.

WIP spacetelescope/jwst#2282

This is to close out references to memory-mapped arrays that,
in the current context, not associated with a file. The `Block._memmapped`
is `False` but the `.data` is a memory-mapped array.

WIP jwst #2282
@stsci-bot
Copy link

stsci-bot bot commented Aug 16, 2018

Hi there @stscieisenhamer 👋 - thanks for the pull request! I'm just a friendly 🤖 that checks for issues related to the changelog. I help make sure that this pull request is milestoned and labeled correctly. This is mainly intended for the maintainers, so if you are not a maintainer you can ignore this, and a maintainer will let you know if any action is required on your part 😃.

Everything looks good from my point of view! 👍

If there are any issues with this message, please report them here.

@coveralls
Copy link

coveralls commented Aug 16, 2018

Coverage Status

Coverage remained the same at 93.845% when pulling 894161d on stscieisenhamer:ijwst228-file-handles into 2994900 on spacetelescope:master.

@stscieisenhamer
Copy link
Author

A bit of test code can be found in @stscieisenhamer gist asdf_blocks.py.

If run without this patch, the end result is 1 open file handle, which has no direct way of being closed.

With the patch, no file handles are left.

@drdavella drdavella added this to the v2.0.3 milestone Aug 17, 2018
Copy link
Contributor

@drdavella drdavella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drdavella drdavella merged commit 485fdb7 into asdf-format:master Aug 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants