Using remote from BrowserWindow - which thread?


#1

Hi,

Quick question - if I use the remote.require call from the BrowserWindow - does the resultant code run on the main thread or the renderer thread? Or do I just need to using the ipc.send option?

Cheers

John


#2

To my knowledge, the BrowserWindow runs its own instance of Node, so the remote modules will always be running in the process it’s been called from. I think there’s a bit of leniency with what you can do between BrowserWindows, but no real way of communicating between processes without IPC.

I assume you’re looking to communicate between the main and renderer processes, in which case you’ll want to use IPC.