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

Add locking to filehandle creation #65

Closed
dagolden opened this issue Oct 6, 2013 · 1 comment
Closed

Add locking to filehandle creation #65

dagolden opened this issue Oct 6, 2013 · 1 comment

Comments

@dagolden
Copy link
Collaborator

dagolden commented Oct 6, 2013

Many modules take a filehandle for input or output (e.g. IO::Compress::Gzip) and they don't bother locking. We should make it easy to produce locked handles from filehandle.

$path->filehandle({ mode => ">", binmode => ":utf8", lock_ex => 1})

or

$path->filehandle( $mode, $binmode, $locked );

Or something along those lines. In the latter case we can guess LOCK_EX or LOCK_SH based on the $mode.

@dagolden
Copy link
Collaborator Author

shipped it already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants