leonid-shevtsov / headless

Create a virtual X screen from Ruby, record videos and take screenshots.
http://leonid.shevtsov.me/en/headless
MIT License
968 stars 113 forks source link

Using headless in a multithreaded program #99

Open mikedalpee opened 6 years ago

mikedalpee commented 6 years ago

I am trying to use headless in a program with SuckerPunch were each job independently accesses different websites using watir/selenium/chrome. Kicking off a single job works fine, but I begin to experience reliability issues if I try to run more than one job concurrently. Is headless able to be used in this manner? I followed your instructions for shared use via "forking", but if by that you meant creating separate processes, then that might explain my issue. In any event, can headless be used by multiple threads withing the same process, and if so, what is the proper usage pattern?

Thanks.