-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
thread_pool: create a new thread group per process
Fixes #576 (ThreadError: can't move to the enclosed thread group) When we `Airbrake.notify` inside a `fork` block, `ThreadPool` tries to respawn workers (which were killed by the `fork`) to the same `ThreadGroup`, which was created in the parent thread. The problem is that that `ThreadGroup` is already finalised in that parent thread and no new threads can be added anymore. The fix is to create a new `ThreadGroup` on `fork`. This way every process will have its own `ThreadGroup`.
- Loading branch information
Showing
3 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters