Skip to content

Commit

Permalink
fix: fixed high cpu usage in follow mode on macos (#588)
Browse files Browse the repository at this point in the history
* build(ci): fixed the list of pull request branches for coverage workflow

* fix: fixed high cpu usage in follow mode on macos
  • Loading branch information
pamburus authored Dec 13, 2024
1 parent d7b1480 commit 393013d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [master, release/*]
pull_request:
branches: ['*']
branches: [master, release/*]

jobs:
test:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = [".", "crate/encstr"]
[workspace.package]
repository = "https://github.com/pamburus/hl"
authors = ["Pavel Ivanov <[email protected]>"]
version = "0.29.9"
version = "0.29.10"
edition = "2021"
license = "MIT"

Expand Down
4 changes: 2 additions & 2 deletions src/fsmon.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// std imports
use std::path::PathBuf;
use std::{path::PathBuf, time::Duration};

Check warning on line 2 in src/fsmon.rs

View workflow job for this annotation

GitHub Actions / Publish for linux-x86-gnu

unused import: `time::Duration`

Check warning on line 2 in src/fsmon.rs

View workflow job for this annotation

GitHub Actions / Publish for linux-x86-musl

unused import: `time::Duration`

Check warning on line 2 in src/fsmon.rs

View workflow job for this annotation

GitHub Actions / Publish for linux-arm-gnu

unused import: `time::Duration`

Check warning on line 2 in src/fsmon.rs

View workflow job for this annotation

GitHub Actions / Publish for linux-arm-musl

unused import: `time::Duration`

Check warning on line 2 in src/fsmon.rs

View workflow job for this annotation

GitHub Actions / Publish for windows-x86

unused import: `time::Duration`

// local imports
use crate::error::Result;
Expand Down Expand Up @@ -124,7 +124,7 @@ mod imp {
watcher.watch()?;

while synced {
let event = if let Some(event) = watcher.poll(None) {
let event = if let Some(event) = watcher.poll(Some(Duration::from_secs(1))) {
event
} else {
continue;
Expand Down

0 comments on commit 393013d

Please sign in to comment.