-
Notifications
You must be signed in to change notification settings - Fork 257
Description
Cucumber unfortunately utilizes the at_exit method as hook. The Parallel gem by default uses the Kernel#fork method which means that when the forked process exits, it will call the parent's at_exit handler. I am not sure if this is intended behaviour for the Parallel gem, but it does cause some unexpected bugs to occur in cucumber, or any other program that uses at_exit in a similiar way. Capybara, minitest, are some others I think use at_exit like this.
Here is the issue I opened with cucumber: cucumber/cucumber-ruby#1327
I was wondering if there was any interest in making Thread the default, or perhaps changing how the #fork workers exit. I think calling exit! will make it not call the parents at_exit handlers, but calling that from inside the Parallel block (in user code) ended up with Deadworker exception which makes sense after perusing the code.
PS: I love how this gem is essentially 1 file, very nice concise code