mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 19:21:35 +01:00
preparing test_user_mode, need to generalize stuff as usual
This commit is contained in:
@@ -78,6 +78,12 @@ class ThreadPool:
|
||||
self.threads.append(thread)
|
||||
thread.start()
|
||||
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
||||
def __exit__(self, type, value, traceback):
|
||||
self.join()
|
||||
|
||||
def submit(self, work):
|
||||
'''
|
||||
Submit work. Block if there is already enough work scheduled (~nthreads).
|
||||
|
||||
Reference in New Issue
Block a user