Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Timeout - #160

Merged
shssoichiro merged 1 commit into
oxipng:masterfrom
kornelski:timeout
Feb 1, 2019
Merged

Timeout#160
shssoichiro merged 1 commit into
oxipng:masterfrom
kornelski:timeout

Conversation

@kornelski

Copy link
Copy Markdown
Contributor

(requires #158)

Short timeouts didn't work well with large images, because the timeout was checked rarely.

This adds more checks of deadline.passed()

@shssoichiro

Copy link
Copy Markdown
Collaborator

Looks like some merge conflicts were introduced after merging #158

@kornelski

Copy link
Copy Markdown
Contributor Author

Rebased

@shssoichiro

Copy link
Copy Markdown
Collaborator

Sorry, one more from merging #162. :)

Comment thread src/lib.rs
eprintln!("Processing: {}", input);
}

let deadline = Arc::new(Deadline::new(opts.timeout, opts.verbosity.is_some()));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does it make more sense to instantiate the Deadline (here and on 443) inside optimize_png to avoid the duplication?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It starts counting time from when it's instantiated, and I wanted it to also include time it takes to load the image.

@shssoichiro
shssoichiro merged commit dad6230 into oxipng:master Feb 1, 2019
@kornelski
kornelski deleted the timeout branch February 2, 2019 17:44
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

Successfully merging this pull request may close these issues.

2 participants