File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 29
29
import re
30
30
import openshot
31
31
import socket
32
+ import time
32
33
from threading import Thread
33
34
from classes import info
34
35
from classes .query import File
@@ -99,6 +100,11 @@ class httpThumbnailHandler(BaseHTTPRequestHandler):
99
100
""" This class handles HTTP requests to the HTTP thumbnail server above."""
100
101
101
102
def do_GET (self ):
103
+ # Pause processing of request (since we don't currently use thread pooling, this allows
104
+ # the threads to be processed without choking the CPU as much
105
+ # TODO: Make HTTPServer work with a limited thread pool and remove this sleep() hack.
106
+ time .sleep (0.01 )
107
+
102
108
""" Process each GET request and return a value (image or file path)"""
103
109
# Parse URL
104
110
url_output = REGEX_THUMBNAIL_URL .findall (self .path )
You can’t perform that action at this time.
0 commit comments