Wrap lock around nailgun spawning to protect against worker threads racing to spawn servers

Review Request #2102 - Created April 20, 2015 and submitted

Information
Nick Howard (Twitter)
pants
1437
582afb5...
Reviewers
pants-reviews
benjyw, jsirois, stuhood, zundel
I'm working on parallelizing some jvm related tasks and I ran into the issue that if multiple threads running NailgunTasks attempt to call runjava around the same time, they may end up spawning multiple nailgun servers. This puts a lock around spawning them so that we can be sure they are only spawned once

CI baking on PR, ran with parallel WIP and saw that no extra servers were spawned.

Eric Ayers
Stu Hood
Benjy Weinberger
Nick Howard (Twitter)
Review request changed

Status: Closed (submitted)

Change Summary:

submitted at https://github.com/pantsbuild/pants/commit/85fd6a4a0560fd4ab624ab12345e1087b51ce2f6

Loading...