from  concurrent.futures import ThreadPoolExecutor
from myDevices.utils.singleton import Singleton
import inspect

executor = ThreadPoolExecutor(max_workers=4)
class ThreadPool(Singleton):
	def Submit(something):
		future = executor.submit(something)
	def SubmitParam(*arg):
		executor.submit(*arg)
	def Shutdown():
		executor.shutdown()
from concurrent.futures import ThreadPoolExecutor
from myDevices.utils.singleton import Singleton

executor = ThreadPoolExecutor(max_workers=4)
class ThreadPool(Singleton):
    """Singleton thread pool class"""

    @staticmethod
    def Submit(func):
        """Submit a function for the thread pool to run"""
        executor.submit(func)

    @staticmethod
    def Shutdown():
        """Shutdown the thread pool"""
        executor.shutdown()
        
Clean up thread pool code.
Clean up thread pool code.

- from  concurrent.futures import ThreadPoolExecutor
+ from concurrent.futures import ThreadPoolExecutor
  from myDevices.utils.singleton import Singleton
- import inspect
  
  executor = ThreadPoolExecutor(max_workers=4)
  class ThreadPool(Singleton):
- 	def Submit(something):
- 		future = executor.submit(something)
- 	def SubmitParam(*arg):
- 		executor.submit(*arg)
+     """Singleton thread pool class"""
+ 
+     @staticmethod
+     def Submit(func):
+         """Submit a function for the thread pool to run"""
+         executor.submit(func)
+ 
+     @staticmethod
- 	def Shutdown():
+     def Shutdown():
+         """Shutdown the thread pool"""
- 		executor.shutdown()
+         executor.shutdown()
+         
Clean up thread pool code.
## Code Before:
from  concurrent.futures import ThreadPoolExecutor
from myDevices.utils.singleton import Singleton
import inspect

executor = ThreadPoolExecutor(max_workers=4)
class ThreadPool(Singleton):
	def Submit(something):
		future = executor.submit(something)
	def SubmitParam(*arg):
		executor.submit(*arg)
	def Shutdown():
		executor.shutdown()
## Instruction:
Clean up thread pool code.
## Code After:
from concurrent.futures import ThreadPoolExecutor
from myDevices.utils.singleton import Singleton

executor = ThreadPoolExecutor(max_workers=4)
class ThreadPool(Singleton):
    """Singleton thread pool class"""

    @staticmethod
    def Submit(func):
        """Submit a function for the thread pool to run"""
        executor.submit(func)

    @staticmethod
    def Shutdown():
        """Shutdown the thread pool"""
        executor.shutdown()
        