Skip to content

Commit

Permalink
refactor!: move back to rusty_pool as it has no memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed May 16, 2023
1 parent 0f8185d commit 3683c0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ edition = "2021"
[dependencies]
anyhow = "1.0.69"
neorg-dirman = "0.1.0"
threadpool = "1.8.1"
rusty_pool = "0.7.0"
tree-sitter = { git = "https://github.com/tree-sitter/tree-sitter" }
tree-sitter-norg = { git = "https://github.com/nvim-neorg/tree-sitter-norg2" }
6 changes: 3 additions & 3 deletions src/breeze.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use anyhow::{anyhow, Result};
use std::io::Read;
use std::path::PathBuf;
use std::{fs::File, sync::Arc};
use threadpool::Builder;
use rusty_pool::Builder;
use tree_sitter::{Language, Parser, Tree};

/// Parses a file and returns its [`Tree`].
Expand All @@ -31,8 +31,8 @@ where
F: Fn(Tree) + Send + Sync + 'static,
{
let threadpool = Builder::new()
.thread_name("neorg".into())
.num_threads(num_jobs.unwrap_or(4))
.name("neorg".into())
.max_size(num_jobs.unwrap_or(4))
.build();

let callback = Arc::new(callback);
Expand Down

0 comments on commit 3683c0c

Please sign in to comment.