- Electron version: 1.1.0
- Operating system: Windows
- Use case: cleanup and reporting tasks executed on quit (headless), which may take time and should not prevent from opening a new instance.
- Proposed solutions:
  - new _app.releaseSingleInstance()_ API which free the singleInstance lock
  - replace _app.releaseSingleInstance()_ API by an event listener (which may be listened/unlistened)
  - [app.makeSingleInstance](https://github.com/electron/electron/blob/master/docs/api/app.md#appmakesingleinstancecallback) returns the result of the callback function. So we can choose to quit or not in a more accurate way.
  - Provide a communication channel between the new instance and the main one (in callback arguments)

atom/browser/api/atom_api_app.cc
return mate::CreateHandle(isolate, new App(isolate));
}
void App::BuildPrototype(
    v8::Isolate* isolate, v8::Local<v8::ObjectTemplate> prototype) {
  auto browser = base::Unretained(Browser::Get());
  mate::ObjectTemplateBuilder(isolate, prototype)
      .SetMethod("quit", base::Bind(&Browser::Quit, browser))
      .SetMethod("exit", base::Bind(&Browser::Exit, browser))
      .SetMethod("focus", base::Bind(&Browser::Focus, browser))
      .SetMethod("getVersion", base::Bind(&Browser::GetVersion, browser))
      .SetMethod("setVersion", base::Bind(&Browser::SetVersion, browser))
      .SetMethod("getName", base::Bind(&Browser::GetName, browser))
      .SetMethod("setName", base::Bind(&Browser::SetName, browser))
      .SetMethod("isReady", base::Bind(&Browser::is_ready, browser))
      .SetMethod("addRecentDocument",
                 base::Bind(&Browser::AddRecentDocument, browser))
      .SetMethod("clearRecentDocuments",
                 base::Bind(&Browser::ClearRecentDocuments, browser))
      .SetMethod("setAppUserModelId",
                 base::Bind(&Browser::SetAppUserModelID, browser))
      .SetMethod("isDefaultProtocolClient",