Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Clean up tern web workers whenever we re-init the tern server, or close ...#3983

Merged
dloverin merged 3 commits intoadobe:masterfrom
eztierney:leaking-workers
May 24, 2013
Merged

Clean up tern web workers whenever we re-init the tern server, or close ...#3983
dloverin merged 3 commits intoadobe:masterfrom
eztierney:leaking-workers

Conversation

@eztierney
Copy link
Copy Markdown
Contributor

...a project.

If we don't call terminate on the worker, it appears that the worker, and all the memory it's using will never get collected. So when we were switching projects, we were leaving behind orphaned workers, resulting in a large memory leak.

To enable re-initing the web worker I had to change around the logic - now the worker sends a message when it is done being init'ed and the main thread waits for that message before it starts sending messages to the workers.

…se a project.

If we don't call terminate on the worker, it appears that the worker, and all the memory it's using will never get collected.  So when we were switching projects, we were leaving behind orphaned workers, resulting in a large memory leak.

To enable re-initing the web worker I had to change around the logic - now the worker sends a message when it is done being init'ed and the main thread waits for that message before it starts sending messages to the workers.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HAd to move this to satisfy JSLint

@dloverin
Copy link
Copy Markdown

done reviewing.

@ghost ghost assigned dloverin May 24, 2013
@julianasuh
Copy link
Copy Markdown
Contributor

Open to @dloverin.

dloverin pushed a commit that referenced this pull request May 24, 2013
Clean up tern web workers whenever we re-init the tern server, or close ...
@dloverin dloverin merged commit e664a00 into adobe:master May 24, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants