Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f6194f8

Browse files
committed
Don't build thumbnails in parallel, as that seems to mysteriously break on some systems.
1 parent ea73919 commit f6194f8

1 file changed

Lines changed: 4 additions & 14 deletions

File tree

doc/sphinxext/gen_gallery.py

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,10 @@ def gen_gallery(app, doctree):
105105
fh.write(content)
106106
fh.close()
107107

108-
try:
109-
import multiprocessing
110-
app.builder.info("generating thumbnails... ", nonl=True)
111-
pool = multiprocessing.Pool()
112-
pool.map(make_thumbnail, thumbnails.iteritems())
113-
pool.close()
114-
pool.join()
115-
app.builder.info("done")
116-
117-
except ImportError:
118-
for key in app.builder.status_iterator(
119-
thumbnails.iterkeys(), "generating thumbnails... ",
120-
length=len(thumbnails)):
121-
image.thumbnail(key, thumbnails[key], 0.3)
108+
for key in app.builder.status_iterator(
109+
thumbnails.iterkeys(), "generating thumbnails... ",
110+
length=len(thumbnails)):
111+
image.thumbnail(key, thumbnails[key], 0.3)
122112

123113
def setup(app):
124114
app.connect('env-updated', gen_gallery)

0 commit comments

Comments
 (0)