mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 19:21:35 +01:00
bak
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from typing import Any, Callable, Dict, Iterable, Union
|
||||
import multiprocessing
|
||||
import queue
|
||||
import sys
|
||||
import threading
|
||||
@@ -66,7 +65,7 @@ class ThreadPool:
|
||||
handle_output = lambda input, output, exception: exception
|
||||
self.handle_output = handle_output
|
||||
if nthreads is None:
|
||||
nthreads = multiprocessing.cpu_count()
|
||||
nthreads = len(os.sched_getaffinity(0))
|
||||
self.nthreads = nthreads
|
||||
self.error_output = None
|
||||
self.error_output_lock = threading.Lock()
|
||||
|
||||
Reference in New Issue
Block a user