mirror of
https://github.com/lifegpc/msg-tool.git
synced 2026-06-07 21:38:58 +08:00
Add mutilple threads support for export image
This commit is contained in:
@@ -35,9 +35,14 @@ impl Counter {
|
||||
/// Increments the count of script executions.
|
||||
pub fn inc(&self, result: ScriptResult) {
|
||||
match result {
|
||||
ScriptResult::Ok => self.ok.fetch_add(1, SeqCst),
|
||||
ScriptResult::Ignored => self.ignored.fetch_add(1, SeqCst),
|
||||
};
|
||||
ScriptResult::Ok => {
|
||||
self.ok.fetch_add(1, SeqCst);
|
||||
}
|
||||
ScriptResult::Ignored => {
|
||||
self.ignored.fetch_add(1, SeqCst);
|
||||
}
|
||||
ScriptResult::Uncount => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user