Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Documentation for injecting event loop #29

Closed
romgrk opened this issue Mar 7, 2021 · 5 comments
Closed

Documentation for injecting event loop #29

romgrk opened this issue Mar 7, 2021 · 5 comments

Comments

@romgrk
Copy link

romgrk commented Mar 7, 2021

Hi, I'm looking into this project to see if it would be reusable for node-gtk, but the file linked in the readme doesn't exist anymore: https://github.com/nodegui/qode#message-loop-injection-api

Where can I find more documentation & code?

Thanks

@romgrk
Copy link
Author

romgrk commented Mar 7, 2021

One more question, why are you maintaining a fork rather than trying to merge the required functionality in nodejs? Is it too invasive to be accepted?

@a7ul
Copy link
Collaborator

a7ul commented Mar 7, 2021

Hey!

You can find it under the node folder

node/src/qode_shared.h

@a7ul
Copy link
Collaborator

a7ul commented Mar 7, 2021

NodeJs doesnt require these changes to run.
The reason why we need to do this is because of two event loops

  1. nodejs event loop
  2. qt's gui event loop

In order to merge them into one, we need these patches.

@a7ul
Copy link
Collaborator

a7ul commented Mar 7, 2021

This is exactly what electron follows too. They too have a separate nodejs fork.

@a7ul a7ul closed this as completed Mar 7, 2021
@romgrk
Copy link
Author

romgrk commented Mar 11, 2021

I skimmed over the code and I was wondering if you could describe lightly how the two threads are used and how the mixing of the event loops is done? No worries if you don't have time, but I'd be happy to understand how this works more in details.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants