This fixes #208. The shared_ptr ensures that the Barrier will not be destroyed while one of the threads is still using it.
Holding off on adding a NEWS to avoid a merge conflict, but this will be the content:
Fixed [#208](https://github.com/rstudio/httpuv/issues/208): In some cases, a race condition could cause the R process to exit when starting a new server. ([#211](https://github.com/rstudio/httpuv/pull/211))
This fixes #208. The
shared_ptr
ensures that theBarrier
will not be destroyed while one of the threads is still using it.Holding off on adding a NEWS to avoid a merge conflict, but this will be the content: